Changeset e86847d in mod_gnutls for src/gnutls_hooks.c


Ignore:
Timestamp:
Jan 11, 2013, 12:56:02 AM (7 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports
Children:
0ab45ea
Parents:
9a9f943 (diff), 2a2272d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge tag 'upstream/0.4.2'

Upstream version 0.4.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r9a9f943 re86847d  
    5858                    apr_pool_t * plog, apr_pool_t * ptemp)
    5959{
     60int ret;
    6061
    6162#if APR_HAS_THREADS
     
    6869#endif
    6970
    70     gnutls_global_init();
    71 
     71    ret = gnutls_global_init();
     72    if (ret < 0) /* FIXME: can we print here? */
     73        exit(ret);
     74                                           
    7275    apr_pool_cleanup_register(pconf, NULL, mgs_cleanup_pre_config,
    7376                              apr_pool_cleanup_null);
     
    131134        return ret;
    132135
    133     /* allow separate caches per virtual host. Actually allowing the same is a
    134      * bad idea, since they might have different security requirements.
    135      */
    136     mgs_cache_session_init(ctxt);
    137136
    138137    return 0;
     
    146145
    147146    ret->type = GNUTLS_CRT_X509;
    148     ret->ncerts = 1;
     147    ret->ncerts = ctxt->sc->certs_x509_num;
    149148    ret->deinit_all = 0;
    150149
    151     ret->cert.x509 = &ctxt->sc->cert_x509;
     150    ret->cert.x509 = ctxt->sc->certs_x509;
    152151    ret->key.x509 = ctxt->sc->privkey_x509;
    153152    return 0;
     
    332331            }
    333332
    334             if (sc->cert_x509 == NULL
     333            if (sc->certs_x509[0] == NULL
    335334                && sc->enabled == GNUTLS_ENABLED_TRUE) {
    336335                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
     
    351350
    352351            if (sc->enabled == GNUTLS_ENABLED_TRUE) {
    353                 rv = read_crt_cn(s, p, sc->cert_x509, &sc->cert_cn);
     352                rv = read_crt_cn(s, p, sc->certs_x509[0], &sc->cert_cn);
    354353                if (rv < 0) {
    355354                    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
     
    589588                                                    mgs_select_virtual_server_cb);
    590589
     590    mgs_cache_session_init(ctxt);
     591
    591592    return ctxt;
    592593}
     
    684685    apr_table_setn(env, "SSL_SESSION_ID", apr_pstrdup(r->pool, tmp));
    685686
    686     mgs_add_common_cert_vars(r, ctxt->sc->cert_x509, 0,
     687    mgs_add_common_cert_vars(r, ctxt->sc->certs_x509[0], 0,
    687688                             ctxt->sc->export_certificates_enabled);
    688689
Note: See TracChangeset for help on using the changeset viewer.