mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
remove TunnelRouting from config, remove Signing from key names
This commit is contained in:
parent
e83b5d08a8
commit
85fae23919
2 changed files with 10 additions and 20 deletions
|
@ -43,16 +43,17 @@ func (c *Core) _init() error {
|
|||
|
||||
current := c.config.GetCurrent()
|
||||
|
||||
sigPriv, err := hex.DecodeString(current.SigningPrivateKey)
|
||||
sigPriv, err := hex.DecodeString(current.PrivateKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(sigPriv) < ed25519.PrivateKeySize {
|
||||
return errors.New("SigningPrivateKey is incorrect length")
|
||||
return errors.New("PrivateKey is incorrect length")
|
||||
}
|
||||
|
||||
c.secret = ed25519.PrivateKey(sigPriv)
|
||||
c.public = c.secret.Public().(ed25519.PublicKey)
|
||||
// TODO check public against current.PublicKey, error if they don't match
|
||||
|
||||
c.PacketConn, err = iw.NewPacketConn(c.secret)
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue