Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Intel EK certificate URLs on Linux #347

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions attest/wrapped_tpm20.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,24 @@ func (t *wrappedTPM20) eks() ([]EK, error) {
if pub.RSAParameters == nil {
return nil, errors.New("ECC EK not yet supported")
}

i, err := t.info()
if err != nil {
return nil, fmt.Errorf("Retrieving TPM info failed: %v", err)
}
ekPub := &rsa.PublicKey{
E: int(pub.RSAParameters.Exponent()),
N: pub.RSAParameters.Modulus(),
}
var certificateURL string
if i.Manufacturer.String() == manufacturerIntel {
certificateURL = intelEKURL(ekPub)
}
return []EK{
{
Public: &rsa.PublicKey{
E: int(pub.RSAParameters.Exponent()),
N: pub.RSAParameters.Modulus(),
},
handle: commonRSAEkEquivalentHandle,
Public: ekPub,
CertificateURL: certificateURL,
handle: commonRSAEkEquivalentHandle,
},
}, nil
}
Expand Down
Loading