Skip to content

crypto/x509: unexpected handling of escape characters #73028

Description

@onepeople158

Go version

go version go1.24.1 linux/amd64

Output of go env in your module/workspace:

CN=test,OU=Class 3 Public Primary Certification Authority,O=VeriSign\\,L=test,ST=test,C=US
2025-01-01 00:00:00 +0000 UTC
2025-12-01 00:00:00 +0000 UTC
1

What did you do?

Hello Developer: I have a CRL file, and the "O" field in its issuer section contains an escape character. The value of the "O" field is 'VeriSign\'. When I use Go to parse this CRL file, Go interprets the "O" field as 'VeriSign\\'. However, when I open the CRL file as a .crl file, the "O" field in the issuer section shows as 'VeriSign\'. Therefore, I suspect that the handling of the escape character '\\' by Go may not be entirely reasonable.

What did you see happen?

The issuer field is parsed as Issuer: CN=test,OU=Class 3 Public Primary Certification Authority,O=VeriSign\\,L=test,ST=test,C=US
.

What did you expect to see?

crl_file_.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.FrozenDueToAgeNeedsInvestigationSomeone 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