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.
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.