Skip to content

crypto/x509: VerifyHostname should ignore port if not present in pattern #15452

Description

@runeaune

x509 certificate verification currently fails for requests that specifies a port, unless the common name pattern in the certificate has the same port specified.

I think this is too strict. If the pattern doesn't have a port, I think the verification should pass for all requests to that host, regardless of port.

Relevant code: https://github.com/golang/go/blob/master/src/crypto/x509/verify.go#L414

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions