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

(-)tomcat-native-1.2.28-src/native/src/ssl.c (-3 / +10 lines)
Lines 367-372 Link Here
367
#endif
367
#endif
368
    free_dh_params();
368
    free_dh_params();
369
369
370
#ifndef OPENSSL_NO_ENGINE
371
    if (tcn_ssl_engine != NULL) {
372
        /* Release the SSL Engine structural reference */
373
        ENGINE_free(tcn_ssl_engine);
374
        tcn_ssl_engine = NULL;
375
    }
376
#endif
377
370
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
378
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
371
    /* Openssl v1.1+ handles all termination automatically. Do
379
    /* Openssl v1.1+ handles all termination automatically. Do
372
     * nothing in this case.
380
     * nothing in this case.
Lines 815-823 Link Here
815
                if (!ENGINE_set_default(ee, ENGINE_METHOD_ALL))
823
                if (!ENGINE_set_default(ee, ENGINE_METHOD_ALL))
816
                    err = APR_ENOTIMPL;
824
                    err = APR_ENOTIMPL;
817
            }
825
            }
818
            /* Free our "structural" reference. */
826
            /* Keep our "structural" reference. */
819
            if (ee)
827
            if (ee)
820
                ENGINE_free(ee);
828
                tcn_ssl_engine = ee;
821
        }
829
        }
822
        if (err != APR_SUCCESS) {
830
        if (err != APR_SUCCESS) {
823
            TCN_FREE_CSTRING(engine);
831
            TCN_FREE_CSTRING(engine);
Lines 825-831 Link Here
825
            tcn_ThrowAPRException(e, err);
833
            tcn_ThrowAPRException(e, err);
826
            return (jint)err;
834
            return (jint)err;
827
        }
835
        }
828
        tcn_ssl_engine = ee;
829
    }
836
    }
830
#endif
837
#endif
831
838

Return to bug 65181