crypto/x509: Certificate.isValid should reject certificates with UnknownPublicKeyAlgorithm #66167
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
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.
The text was updated successfully, but these errors were encountered: