in linux/tpm_keys.go [80:97]
func (key *tpmKey) GetPublicBytes() []byte {
if key.IsEmpty() {
flog.Warningf("Empty key. Cannot get public bytes.")
return nil
}
if key.PublicBytes != nil {
return key.PublicBytes
}
rawBytes, err := key.PublicArea.Encode()
if err != nil {
flog.Warningf("Got error decoding key public area: %v", err)
return nil
}
return rawBytes
}