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

(-)tomcat-native-1.1.16-src/jni/native/src/sslcontext.c.openssl (-2 / +2 lines)
Lines 366-375 TCN_IMPLEMENT_CALL(jboolean, SSLContext, Link Here
366
        if (ca_certs == NULL) {
366
        if (ca_certs == NULL) {
367
            SSL_load_client_CA_file(J2S(file));
367
            SSL_load_client_CA_file(J2S(file));
368
            if (ca_certs != NULL)
368
            if (ca_certs != NULL)
369
                SSL_CTX_set_client_CA_list(c->ctx, (STACK *)ca_certs);
369
                SSL_CTX_set_client_CA_list(c->ctx, ca_certs);
370
        }
370
        }
371
        else {
371
        else {
372
            if (!SSL_add_file_cert_subjects_to_stack((STACK *)ca_certs, J2S(file)))
372
            if (!SSL_add_file_cert_subjects_to_stack(ca_certs, J2S(file)))
373
                ca_certs = NULL;
373
                ca_certs = NULL;
374
        }
374
        }
375
        if (ca_certs == NULL && c->verify_mode == SSL_CVERIFY_REQUIRE) {
375
        if (ca_certs == NULL && c->verify_mode == SSL_CVERIFY_REQUIRE) {
(-)tomcat-native-1.1.16-src/jni/native/src/sslutils.c.openssl (-2 / +2 lines)
Lines 424-430 int SSL_CTX_use_certificate_chain(SSL_CT Link Here
424
    X509 *x509;
424
    X509 *x509;
425
    unsigned long err;
425
    unsigned long err;
426
    int n;
426
    int n;
427
    STACK *extra_certs;
427
    STACK_OF(X509) *extra_certs;
428
428
429
    if ((bio = BIO_new(BIO_s_file_internal())) == NULL)
429
    if ((bio = BIO_new(BIO_s_file_internal())) == NULL)
430
        return -1;
430
        return -1;
Lines 443-449 int SSL_CTX_use_certificate_chain(SSL_CT Link Here
443
    /* free a perhaps already configured extra chain */
443
    /* free a perhaps already configured extra chain */
444
    extra_certs = SSL_CTX_get_extra_certs(ctx);
444
    extra_certs = SSL_CTX_get_extra_certs(ctx);
445
    if (extra_certs != NULL) {
445
    if (extra_certs != NULL) {
446
        sk_X509_pop_free((STACK_OF(X509) *)extra_certs, X509_free);
446
        sk_X509_pop_free(extra_certs, X509_free);
447
        SSL_CTX_set_extra_certs(ctx,NULL);
447
        SSL_CTX_set_extra_certs(ctx,NULL);
448
    }
448
    }
449
    /* create new extra chain by loading the certs */
449
    /* create new extra chain by loading the certs */

Return to bug 48129