mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-20 23:19:27 +00:00
cmd/tailscale,ipn: minor fixes to tailscale lock commands
* Fix broken add/remove key commands * Make lock status display whether the node is signed Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
@@ -100,6 +100,17 @@ type NLPublic struct {
|
||||
k [ed25519.PublicKeySize]byte
|
||||
}
|
||||
|
||||
// NLPublicFromEd25519Unsafe converts an ed25519 public key into
|
||||
// a type of NLPublic.
|
||||
//
|
||||
// New uses of this function should be avoided, as its possible to
|
||||
// accidentally construct an NLPublic from a non network-lock key.
|
||||
func NLPublicFromEd25519Unsafe(public ed25519.PublicKey) NLPublic {
|
||||
var out NLPublic
|
||||
copy(out.k[:], public)
|
||||
return out
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextUnmarshaler.
|
||||
func (k *NLPublic) UnmarshalText(b []byte) error {
|
||||
return parseHex(k.k[:], mem.B(b), mem.S(nlPublicHexPrefix))
|
||||
|
Reference in New Issue
Block a user