Skip to content

crypto/x509: Certificate.isValid should reject certificates with UnknownPublicKeyAlgorithm #66167

Description

@rolandshoemaker

A certificate with UnknownPublicKeyAlgorithm is not reasonably useful, since it cannot be used to verify any signatures, isValid should therefore reject it.

The one argument against this is for certificates which use key types which we don't support in the standard library, but for which third-party support does exist. In this case they could parse the key from the RawSubjectPublicKeyInfo, and use that to verify signatures, but that seems likely to be an incredibly uncommon use case (which I am not particularly sure actually currently exists).

Related to #66166, this would prevent putting certificates in the pool which can only reasonably be used by themselves.

Metadata

Metadata

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions