mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-25 01:56:37 +00:00
types/persist: add AttestationKey (#17281)
Extend Persist with AttestationKey to record a hardware-backed attestation key for the node's identity. Add a flag to tailscaled to allow users to control the use of hardware-backed keys to bind node identity to individual machines. Updates tailscale/corp#31269 Change-Id: Idcf40d730a448d85f07f1bebf387f086d4c58be3 Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
This commit is contained in:
committed by
GitHub
parent
a2dc517d7d
commit
e45557afc0
@@ -121,7 +121,12 @@ func gen(buf *bytes.Buffer, it *codegen.ImportTracker, typ *types.Named) {
|
||||
continue
|
||||
}
|
||||
if !hasBasicUnderlying(ft) {
|
||||
writef("dst.%s = *src.%s.Clone()", fname, fname)
|
||||
// don't dereference if the underlying type is an interface
|
||||
if _, isInterface := ft.Underlying().(*types.Interface); isInterface {
|
||||
writef("if src.%s != nil { dst.%s = src.%s.Clone() }", fname, fname, fname)
|
||||
} else {
|
||||
writef("dst.%s = *src.%s.Clone()", fname, fname)
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user