Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2280

HostnameVerifier does not support using IP address in CN

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 5.0.4
    • None
    • None
    • None

    Description

      Hi,
      we are migrating from the 4.x client to 5.x and noticed that the behavior of the DefaultHostnameVerifier changed. Since HTTPCLIENT-2149 https://github.com/apache/httpcomponents-client/pull/302 the HostnameVerifier does no longer accept certificates with an ip address in its CN and with no subject alts. Verification fails with "Certificate for <127.0.0.1> doesn't match any of the subject alternative names: []".

      I know using ip addresses in the CN is not really recommended or good practice, but I also see no reason to not use the `matchCN` fallback in this case. The functionality was probably just removed by accident with HTTPCLIENT-2149.

      I will open A github PR with my proposed solution once I know the number of this issue

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ydylla Yannick Dylla
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m