View | Details | Raw Unified | Return to bug 59797
Collapse All | Expand All

(-)a/native/src/ssl.c (-5 / +19 lines)
Lines 272-277 TCN_IMPLEMENT_CALL(jstring, SSL, Link Here
272
    return AJP_TO_JSTRING(OPENSSL_VERSION_TEXT);
272
    return AJP_TO_JSTRING(OPENSSL_VERSION_TEXT);
273
}
273
}
274
static void ssl_err_remove(void) {
275
#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || defined(OPENSSL_USE_DEPRECATED)
276
    ERR_remove_state(0);
277
#elif (OPENSSL_VERSION_NUMBER < 0x10100000L)
278
    ERR_remove_thread_state(NULL);
279
#endif
280
}
281
274
/*
282
/*
275
 *  the various processing hooks
283
 *  the various processing hooks
276
 */
284
 */
Lines 310-320 static apr_status_t ssl_init_cleanup(void *data) Link Here
310
#if OPENSSL_VERSION_NUMBER >= 0x00907001
318
#if OPENSSL_VERSION_NUMBER >= 0x00907001
311
    CRYPTO_cleanup_all_ex_data();
319
    CRYPTO_cleanup_all_ex_data();
312
#endif
320
#endif
313
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
321
    ssl_err_remove();
314
    ERR_remove_state(0);
315
#else
316
    ERR_remove_thread_state(NULL);
317
#endif
318
    /* Don't call ERR_free_strings here; ERR_load_*_strings only
322
    /* Don't call ERR_free_strings here; ERR_load_*_strings only
319
     * actually load the error strings once per process due to static
323
     * actually load the error strings once per process due to static
Lines 1105-1110 TCN_IMPLEMENT_CALL(jboolean, SSL, Link Here
1105
    return op == (op & supported_ssl_opts) ? JNI_TRUE : JNI_FALSE;
1109
    return op == (op & supported_ssl_opts) ? JNI_TRUE : JNI_FALSE;
1106
}
1110
}
1111
TCN_IMPLEMENT_CALL(void, SSL, threadCleanup)(TCN_STDARGS) {
1112
    UNREFERENCED(o);
1113
    ssl_err_remove();
1114
}
1115
1107
#else
1116
#else
1108
/* OpenSSL is not supported.
1117
/* OpenSSL is not supported.
1109
 * Create empty stubs.
1118
 * Create empty stubs.
Lines 1231-1234 TCN_IMPLEMENT_CALL(jboolean, SSL, Link Here
1231
    UNREFERENCED(op);
1240
    UNREFERENCED(op);
1232
    return JNI_FALSE;
1241
    return JNI_FALSE;
1233
}
1242
}
1243
1244
TCN_IMPLEMENT_CALL(void, SSL, threadCleanup)(TCN_STDARGS) {
1245
    UNREFERENCED_STDARGS;
1246
}
1247
1234
#endif
1248
#endif

Return to bug 59797