[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1565531 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 17 Feb 2014 12:33:32 +0000 (GMT)

Ben fixed this in r1568349. Thanks, Ben.

- Julian

Julian Foad wrote:
> This commit is causing a change of behaviour for me against the Apache svn repo.
[...]
>>  +      svn_boolean_t found_san_entry;
>>
>>  @@ -232,6 +233,7 @@ ssl_server_cert(void *baton, int failure
>>         /* Try to find matching server name via subjectAltName first... */
>>         if (san) {
>
> Here, "san" is false (no SubjectAltName found), so found_san_entry
> remains uninitialized...
>
>>             int i;
>>  +          found_san_entry = san->nelts > 0;
>>             for (i = 0; i < san->nelts; i++) {
>>  @@ -243,8 +245,11 @@ ssl_server_cert(void *baton, int failure
>>             }
>>         }
>>
>>  -      /* Match server certificate CN with the hostname of the server */
>>  -      if (!found_matching_hostname)
>>  +      /* Match server certificate CN with the hostname of the server iff
>>  +       * we didn't find any subjectAltName fields and try to match them.
>>  +       * Per RFC 2818 they are authoritative if present and CommonName
>>  +       * should be ignored. */
>>  +      if (!found_matching_hostname && !found_san_entry)
>>           {
>
> ... and here we skip this block because found_san_entry is -134885336 i.e.
> "true".
>
> This results in the certificate being considered invalid.
>
> - Julian
Received on 2014-02-17 13:34:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.