mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-23 00:51:35 +00:00
Remove unneeded AWDL context functions
This commit is contained in:
parent
4622a85c34
commit
c8db66b17d
@ -64,15 +64,6 @@ func (c *Core) AWDLCreateInterface(boxPubKey string, sigPubKey string, name stri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Core) AWDLCreateInterfaceFromContext(context []byte, name string) error {
|
|
||||||
if len(context) < crypto.BoxPubKeyLen+crypto.SigPubKeyLen {
|
|
||||||
return errors.New("Not enough bytes in context")
|
|
||||||
}
|
|
||||||
boxPubKey := hex.EncodeToString(context[:crypto.BoxPubKeyLen])
|
|
||||||
sigPubKey := hex.EncodeToString(context[crypto.BoxPubKeyLen:])
|
|
||||||
return c.AWDLCreateInterface(boxPubKey, sigPubKey, name)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Core) AWDLShutdownInterface(name string) error {
|
func (c *Core) AWDLShutdownInterface(name string) error {
|
||||||
return c.awdl.shutdown(name)
|
return c.awdl.shutdown(name)
|
||||||
}
|
}
|
||||||
@ -92,10 +83,3 @@ func (c *Core) AWDLSendPacket(identity string, buf []byte) error {
|
|||||||
}
|
}
|
||||||
return errors.New("AWDLSendPacket identity not known: " + identity)
|
return errors.New("AWDLSendPacket identity not known: " + identity)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Core) AWDLConnectionContext() []byte {
|
|
||||||
var context []byte
|
|
||||||
context = append(context, c.boxPub[:]...)
|
|
||||||
context = append(context, c.sigPub[:]...)
|
|
||||||
return context
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user