crypto/x509: support OIDs for tcg-kp (2.23.133.8) #47620
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, according to the sources.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm playing around TPM Endorsement Key certificates. One of the things I want to archive is to verify a EK certificate against the root CA. The function looks like
What did you expect to see?
I expect all ExtKeyUsages to be correctly parsed with ParseCertificate.
What did you see instead?
UnknownExtKeyIsage
of the x509.Certificate object (ek
) is not empty. It contains asn1.ObjectIdentifier 2.23.133.8.1. Verification fails withx509: certificate specifies an incompatible key usage
. The latter can be fixed by addingKeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageAny}
tox509.VerifyOptions
.The reason
crypto.x509 has extKeyUsageOIDs.
There is no any tcg-kp OID.
The proposal
Add tcg-kp OIDs to extKeyUsageOIDs. However, I understand that it can be excessive as there are plenty of other OIDs people may wish to add.
The text was updated successfully, but these errors were encountered: