mirror of
https://github.com/kairos-io/tpm-helpers.git
synced 2025-07-31 05:49:49 +00:00
Expose DecodePubHash
This commit is contained in:
parent
fb83f16609
commit
a7b15ad1f8
2
tpm.go
2
tpm.go
@ -60,7 +60,7 @@ func GetPubHash(opts ...Option) (string, error) {
|
||||
return "", fmt.Errorf("getting EK: %w", err)
|
||||
}
|
||||
|
||||
hash, err := getPubHash(ek)
|
||||
hash, err := DecodePubHash(ek)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("hashing EK: %w", err)
|
||||
}
|
||||
|
@ -43,7 +43,8 @@ type ChallengeResponse struct {
|
||||
Secret []byte
|
||||
}
|
||||
|
||||
func getPubHash(ek *attest.EK) (string, error) {
|
||||
// DecodePubHash returns the public key from an attestation EK
|
||||
func DecodePubHash(ek *attest.EK) (string, error) {
|
||||
data, err := pubBytes(ek)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Loading…
Reference in New Issue
Block a user