-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/x509: Verify should reject certificates with empty issuers #71832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dulanshuangqiao , I'm investigating your problem, but would be good to update your code, since this certificate is not valid anymore, you need to set custom CurrentTime in order to execute it again:
|
OK, I'll wait for your results. |
Change https://go.dev/cl/655715 mentions this issue: |
Go version
go version go1.23.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Perform certificate verification
go run go_verify.go
certs.zip
What did you see happen?
The execution result is passed verification
Certificate is valid!
What did you expect to see?
RFC5280 mentions: The issuer field MUST contain a non-empty distinguished name (DN). This means that the certificate I provided should not pass the validation.
Gnutls threw an error when validating it:
Loaded CAs (1 available)
gnutls_x509_crt_get_issuer_dn: The requested data were not available.
The text was updated successfully, but these errors were encountered: