Skip to content

Commit 824f943

Browse files
committed
Get SSL Apache context according to the current mod_ssl
Fixes the crash from issue #30 (openssl 1.1 support).
1 parent f98c56f commit 824f943

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/canl_mod_gridsite.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -3490,7 +3490,9 @@ static int mod_gridsite_perm_handler(request_rec *r)
34903490

34913491
int GRST_callback_SSLVerify_wrapper(int ok, X509_STORE_CTX *ctx)
34923492
{
3493-
SSL *ssl = (SSL *) X509_STORE_CTX_get_app_data(ctx);
3493+
/* Get Apache context back through OpenSSL context */
3494+
SSL *ssl = X509_STORE_CTX_get_ex_data(ctx,
3495+
SSL_get_ex_data_X509_STORE_CTX_idx());
34943496
conn_rec *conn = (conn_rec *) SSL_get_app_data(ssl);
34953497
int errnum = X509_STORE_CTX_get_error(ctx);
34963498
int errdepth = X509_STORE_CTX_get_error_depth(ctx);

0 commit comments

Comments
 (0)