mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
tka, types/key: add NLPublic.KeyID
This allows direct use of NLPublic with tka.Authority.KeyTrusted() and similar without using tricks like converting the return value of Verifier. Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
This commit is contained in:

committed by
Adrian Dewhurst

parent
944f43f1c8
commit
8c09ae9032
@@ -125,3 +125,8 @@ func (k NLPublic) IsZero() bool {
|
||||
func (k NLPublic) Equal(other NLPublic) bool {
|
||||
return subtle.ConstantTimeCompare(k.k[:], other.k[:]) == 1
|
||||
}
|
||||
|
||||
// KeyID returns a tkatype.KeyID that can be used with a tka.Authority.
|
||||
func (k NLPublic) KeyID() tkatype.KeyID {
|
||||
return k.k[:]
|
||||
}
|
||||
|
Reference in New Issue
Block a user