Fix sig mismatch in AIK certification (#50)

This commit is contained in:
Tom D 2019-07-12 10:30:30 -07:00 committed by GitHub
parent 83cab51aec
commit 0f6a187a1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,7 +417,7 @@ func (t *TPM) MintAIK(opts *MintOptions) (*Key, error) {
return nil, fmt.Errorf("CertifyCreation failed: %v", err)
}
// Pack the raw structure into a TPMU_SIGNATURE.
signature, err := tpmutil.Pack(tpm2.AlgRSASSA, tpm2.AlgSHA256, sig)
signature, err := tpmutil.Pack(tpm2.AlgRSASSA, tpm2.AlgSHA256, tpmutil.U16Bytes(sig))
if err != nil {
return nil, fmt.Errorf("failed to pack TPMT_SIGNATURE: %v", err)
}