Author: hwright Date: Mon Aug 1 13:34:20 2011 New Revision: 1152770 URL: http://svn.apache.org/viewvc?rev=1152770&view=rev Log: Merge r1151177 from trunk:
* r1151177 Fix two bugs in ra_serf when connecting to HTTPS repository hosted on non-standard port. 1. ra_serf complains that server certificate doesn't match hostname. 2. XML parsing failed: (400 Bad Request) error when working with SNI enabled server. http://svn.haxx.se/users/archive-2011-07/0404.shtml Justification: Users are unable to use repositories over HTTPS protocol hosted on non-standard TCP port. Votes: +1: ivan, rhuijben, cmpilato Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_ra_serf/ra_serf.h subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c subversion/branches/1.7.x/subversion/libsvn_ra_serf/update.c subversion/branches/1.7.x/subversion/libsvn_ra_serf/util.c Propchange: subversion/branches/1.7.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 1 13:34:20 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150506,1150812,1150853,1151036,1151610,1151911,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151911,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152770&r1=1152769&r2=1152770&view=diff ============================================================================== --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Mon Aug 1 13:34:20 2011 @@ -189,16 +189,3 @@ Approved changes: an operation, as no signal is raised. Votes: +1: rhuijben, hwright, cmpilato - - * r1151177 - Fix two bugs in ra_serf when connecting to HTTPS repository hosted on - non-standard port. - 1. ra_serf complains that server certificate doesn't match hostname. - 2. XML parsing failed: (400 Bad Request) error when working with SNI - enabled server. - http://svn.haxx.se/users/archive-2011-07/0404.shtml - Justification: - Users are unable to use repositories over HTTPS protocol hosted on - non-standard TCP port. - Votes: - +1: ivan, rhuijben, cmpilato Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/ra_serf.h URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/ra_serf.h?rev=1152770&r1=1152769&r2=1152770&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/ra_serf.h (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/ra_serf.h Mon Aug 1 13:34:20 2011 @@ -74,7 +74,7 @@ typedef struct svn_ra_serf__connection_t serf_bucket_alloc_t *bkt_alloc; /* Host name */ - const char *hostinfo; + const char *hostname; /* Are we using ssl */ svn_boolean_t using_ssl; Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c?rev=1152770&r1=1152769&r2=1152770&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/serf.c Mon Aug 1 13:34:20 2011 @@ -400,7 +400,7 @@ svn_ra_serf__open(svn_ra_session_t *sess serf_sess->conns[0]->using_ssl = serf_sess->using_ssl; serf_sess->conns[0]->using_compression = serf_sess->using_compression; - serf_sess->conns[0]->hostinfo = url.hostinfo; + serf_sess->conns[0]->hostname = url.hostname; serf_sess->conns[0]->useragent = NULL; /* create the user agent string */ Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/update.c?rev=1152770&r1=1152769&r2=1152770&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/update.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/update.c Mon Aug 1 13:34:20 2011 @@ -2214,7 +2214,7 @@ open_connection_if_needed(svn_ra_serf__s sess->conns[cur] = apr_palloc(sess->pool, sizeof(*sess->conns[cur])); sess->conns[cur]->bkt_alloc = serf_bucket_allocator_create(sess->pool, NULL, NULL); - sess->conns[cur]->hostinfo = sess->conns[0]->hostinfo; + sess->conns[cur]->hostname = sess->conns[0]->hostname; sess->conns[cur]->using_ssl = sess->conns[0]->using_ssl; sess->conns[cur]->using_compression = sess->conns[0]->using_compression; sess->conns[cur]->useragent = sess->conns[0]->useragent; Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/util.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/util.c?rev=1152770&r1=1152769&r2=1152770&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/util.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/util.c Mon Aug 1 13:34:20 2011 @@ -238,7 +238,7 @@ ssl_server_cert(void *baton, int failure int i; for (i = 0; i < san->nelts; i++) { char *s = APR_ARRAY_IDX(san, i, char*); - if (apr_fnmatch(s, conn->hostinfo, + if (apr_fnmatch(s, conn->hostname, APR_FNM_PERIOD) == APR_SUCCESS) { found_matching_hostname = 1; cert_info.hostname = s; @@ -250,7 +250,7 @@ ssl_server_cert(void *baton, int failure /* Match server certificate CN with the hostname of the server */ if (!found_matching_hostname && cert_info.hostname) { - if (apr_fnmatch(cert_info.hostname, conn->hostinfo, + if (apr_fnmatch(cert_info.hostname, conn->hostname, APR_FNM_PERIOD) == APR_FNM_NOMATCH) { svn_failures |= SVN_AUTH_SSL_CNMISMATCH; @@ -364,7 +364,7 @@ conn_setup(apr_socket_t *sock, conn->ssl_context = serf_bucket_ssl_encrypt_context_get(*read_bkt); #if SERF_VERSION_AT_LEAST(1,0,0) - serf_ssl_set_hostname(conn->ssl_context, conn->hostinfo); + serf_ssl_set_hostname(conn->ssl_context, conn->hostname); #endif serf_ssl_client_cert_provider_set(conn->ssl_context,