]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify): Use
authorJoe Orton <jorton@apache.org>
Wed, 8 Dec 2004 09:43:21 +0000 (09:43 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 8 Dec 2004 09:43:21 +0000 (09:43 +0000)
X509_STORE_CTX_get_ex_data() and SSL_get_ex_data_X509_STORE_CTX_idx()
to use the correct ex_data index from the context in pathological
cases where SSL_get_ex_data_X509_STORE_CTX_idx() does not return 0.

PR: 32529

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111241 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_kernel.c

index f43592517e89c6e7bfab0efc79d1f2b69493e506..7e94a45a7cc532f5b67069d7d3230076ffd629e2 100644 (file)
@@ -1203,7 +1203,8 @@ DH *ssl_callback_TmpDH(SSL *ssl, int export, int keylen)
 int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
 {
     /* Get Apache context back through OpenSSL context */
-    SSL *ssl            = (SSL *)X509_STORE_CTX_get_app_data(ctx);
+    SSL *ssl = X509_STORE_CTX_get_ex_data(ctx,
+                                          SSL_get_ex_data_X509_STORE_CTX_idx());
     conn_rec *conn      = (conn_rec *)SSL_get_app_data(ssl);
     server_rec *s       = conn->base_server;
     request_rec *r      = (request_rec *)SSL_get_app_data2(ssl);