serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1781241 - /serf/trunk/test/MockHTTPinC/MockHTTP_server.c
Date Wed, 01 Feb 2017 12:59:29 GMT
Author: stsp
Date: Wed Feb  1 12:59:29 2017
New Revision: 1781241

URL: http://svn.apache.org/viewvc?rev=1781241&view=rev
Log:
* test/MockHTTPinC/MockHTTP_server.c
  (initSSLCtx): SSL_CTX_add_extra_chain_cert transfers ownership of the given
   certificate, so it's best to call X509_STORE_add_cert with that certificate
   before rather than after it. 

Patch by: Adam Langley

Modified:
    serf/trunk/test/MockHTTPinC/MockHTTP_server.c

Modified: serf/trunk/test/MockHTTPinC/MockHTTP_server.c
URL: http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_server.c?rev=1781241&r1=1781240&r2=1781241&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP_server.c (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP_server.c Wed Feb  1 12:59:29 2017
@@ -2755,8 +2755,8 @@ static apr_status_t initSSLCtx(_mhClient
                 X509 *ssl_cert = PEM_read_X509(fp, NULL, NULL, NULL);
                 fclose(fp);
 
-                SSL_CTX_add_extra_chain_cert(ssl_ctx->ctx, ssl_cert);
                 X509_STORE_add_cert(store, ssl_cert);
+                SSL_CTX_add_extra_chain_cert(ssl_ctx->ctx, ssl_cert);
             }
         }
 



Mime
View raw message