Skip to content

validate_hostname SAN list precedence #14

Open

Description

@ShiFoo

Hi everyone,

i have a question regarding your reference implementation of validate_hostname.
A customer of mine has a server certificate with an empty SAN list, which causes the server hostname validation always to fail (MatchNotFound). The Common Name contains the correct value but is not being used if the SAN list does not contain a matching entry. I was not able to find the corresponding text snippet in the RFC 6125 to reflect this behaviour.
Wouldn't it make more sense to treat an empty SAN list like a non-existing one?

Best regards

Activity

  1. tomrittervg commented on Jul 14, 2016

    @tomrittervg

    That may be a reasonable work around in the code for broken-combatibility; but the Basic Requirements require the SAN list to contain any domain listed in the Common Name field. Whoever issued that certificate is at fault.

    At this point we don't think we intend to update this library, so while I'll leave this issue open, we won't be addressing it.

  2. ShiFoo commented on Jul 15, 2016

    @ShiFoo
    Author

    Thank you very much for the quick answer.
    For anybody else: I dug some more and found a stack overflow thread that references the RFCs that mention your implemented behaviour.

    http://stackoverflow.com/questions/5935369/ssl-how-do-common-names-cn-and-subject-alternative-names-san-work-together

    You are right, the certificate issuer is at fault.
    Best regards

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions