crypto/x509: ParseCertificate and ParseCertificates return different errors with a single bad certificate supplied #43113
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.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Both
x509.ParseCertificate
andx509.ParseCertificates
return non-nil error.What did you see instead?
x509.ParseCertificate
returns a non-nil error whilex509.ParseCertificates
returnsnil
for error.Output
It could be argued that
x509.ParserCertificates
returns empty slice in this case, but I don't think it can justify a "nil" error. Especially, the returned results are inconsistent here.The text was updated successfully, but these errors were encountered: