mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
21 lines
488 B
Go
21 lines
488 B
Go
package logic
|
|
|
|
// RetrievePrivateTrafficKey - retrieves private key of server
|
|
func RetrievePrivateTrafficKey() ([]byte, error) {
|
|
var telRecord, err = fetchTelemetryRecord()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return telRecord.TrafficKeyPriv, nil
|
|
}
|
|
|
|
// RetrievePublicTrafficKey - retrieves public key of server
|
|
func RetrievePublicTrafficKey() ([]byte, error) {
|
|
var telRecord, err = fetchTelemetryRecord()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return telRecord.TrafficKeyPub, nil
|
|
}
|