mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-15 14:20: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
|
|
}
|