mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 22:55:06 +03:00
1. fixed Public key size condition
This commit is contained in:
parent
ac237ef231
commit
e6b176c735
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ func (c *cryptokey) addRemoteSubnet(cidr string, dest string) error {
|
||||||
// Decode the public key
|
// Decode the public key
|
||||||
if bpk, err := hex.DecodeString(dest); err != nil {
|
if bpk, err := hex.DecodeString(dest); err != nil {
|
||||||
return err
|
return err
|
||||||
} else if len(bpk) != ed25519.PrivateKeySize {
|
} else if len(bpk) != ed25519.PublicKeySize {
|
||||||
return fmt.Errorf("incorrect key length for %s", dest)
|
return fmt.Errorf("incorrect key length for %s", dest)
|
||||||
} else {
|
} else {
|
||||||
// Add the new crypto-key route
|
// Add the new crypto-key route
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue