types/key: add IsZero method to HardwareAttestationKey (#17370)
We will need this for unmarshaling node prefs: use the zero HardwareAttestationKey implementation when parsing and later check `IsZero` to see if anything was loaded. Updates #15830 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
@@ -262,3 +262,5 @@ func (ak *attestationKey) Clone() key.HardwareAttestationKey {
|
||||
pub: ak.pub,
|
||||
}
|
||||
}
|
||||
|
||||
func (ak *attestationKey) IsZero() bool { return !ak.loaded() }
|
||||
|
||||
Reference in New Issue
Block a user