[PATCH] Problem with unsigned/unknown certs with SSL and ra_serf
From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: Tue, 4 Nov 2008 15:25:28 -0600
I'm currently running into an issue with the new cert stuff that Ivan
ra_serf currently constructs the realmstring (ie
Now, what happens is that if you have a self-signed cert, OpenSSL will
One option is to use cert_info.hostname (aka CN) as the key (not
------
That isn't quite what I'd want. So, I'm tempted to go with just
Thoughts? -- justin
---- * subversion/libsvn_ra_serf/util.c (ssl_server_cert): Pass in cert_info.hostname into credential system. Index: subversion/libsvn_ra_serf/util.c =================================================================== --- subversion/libsvn_ra_serf/util.c (revision 34034) +++ subversion/libsvn_ra_serf/util.c (working copy) @@ -109,7 +109,7 @@ ssl_server_cert(void *baton, int failures, svn_auth_ssl_server_cert_info_t cert_info; svn_auth_cred_ssl_server_trust_t *server_creds = NULL; svn_auth_iterstate_t *state; - const char *realmstring; + const char *realmstring, *realm_cert_string; apr_uint32_t svn_failures; svn_error_t *err; apr_hash_t *issuer, *subject, *serf_cert; @@ -166,9 +166,19 @@ ssl_server_cert(void *baton, int failures, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO, &cert_info); + if (cert_info.hostname) + { + realm_cert_string = apr_pstrcat(subpool, realmstring, cert_info.hostname, + NULL); + } + else + { + realm_cert_string = realmstring; + } + err = svn_auth_first_credentials(&creds, &state, SVN_AUTH_CRED_SSL_SERVER_TRUST, - realmstring, + realm_cert_string, conn->session->wc_callbacks->auth_baton, subpool); if (err || ! creds) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org For additional commands, e-mail: dev-help_at_subversion.tigris.orgReceived on 2008-11-04 22:25:42 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.