cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <>
Subject [jira] [Commented] (CXF-6143) SSL/TLS hostname verification does not strictly follow HTTPS RFC2818
Date Mon, 19 Jan 2015 16:25:36 GMT


Colm O hEigeartaigh commented on CXF-6143:

Hi Aki,

> Can we locally include this file so that the build works without an internet connection?

No, due to the licensing. It can be included in the distribution but not in the source. Unfortunately
this means we require internet access for the build, as you have pointed out. I don't see
an alternative right now though...

> Second, this file doesn't seem to be currently included in the target jar file (because
this is a plain text file in a folder that contains no class files). Shouldn't this file be

Ooops yes it should! Do you know offhand how to include it? If not I will take a look.


> SSL/TLS hostname verification does not strictly follow HTTPS RFC2818
> --------------------------------------------------------------------
>                 Key: CXF-6143
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0.2
>            Reporter: Chad Loder
>            Assignee: Colm O hEigeartaigh
>              Labels: security,, ssl
>             Fix For: 3.0.4, 2.7.15
> The HTTPS specification [RFC 2818, section 3.1|]
> {quote}
>    If a subjectAltName extension of type dNSName is present, that MUST
>    be used as the identity. Otherwise, the (most specific) Common Name
>    field in the Subject field of the certificate MUST be used. Although
>    the use of the Common Name is existing practice, it is deprecated and
>    Certification Authorities are encouraged to use the dNSName instead.
> {quote}
> The current [CertificateHostnameVerifier|;a=blob;f=rt/transports/http/src/main/java/org/apache/cxf/transport/https/]
implementation in CXF does not follow this logic, even in STRICT mode. Instead, it builds
an array of both CNs and subjectAltNames and checks each of them sequentially, in the order
returned in the certificate.
> The proper approach would be to build a list of subjectAltNames having type dNSName.
If the list is non-empty, matching should proceed against this list ONLY - and validation
should fail if no subjectAltName matches. Otherwise, only if the subjectAltName list is empty,
a list of CNs from the Subject field should be built, and perhaps sorted from most- to least-specific.
A match should then proceed against this list, taking into account wildcards of course.
> Likewise, the [HostnameVerifier implementation in not-yet-commons-ssl|]
has the same issue. However, since not-yet-commons-ssl is a generic SSL/TLS transport library,
it should not be made to follow HTTPS application layer rules for all TLS connections - instead
a STRICT_HTTPS mode could be implemented for this purpose.
> For more information, see (for future reference
and background on where implementations are going) and

This message was sent by Atlassian JIRA

View raw message