Changeset 836c2f9 in mod_gnutls for src/gnutls_config.c


Ignore:
Timestamp:
May 24, 2005, 1:55:17 PM (14 years ago)
Author:
Paul Querna <chip@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
740a39e
Parents:
84cb5b2
Message:

start the CA Certificate code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    r84cb5b2 r836c2f9  
    215215    int rv;
    216216    const char* file;
     217    apr_pool_t* spool;
     218    gnutls_datum_t data;
     219
    217220    mgs_srvconf_rec *sc =
    218221        (mgs_srvconf_rec *) ap_get_module_config(parms->server->
    219222                                                        module_config,
    220223                                                        &gnutls_module);       
    221     file = ap_server_root_relative(parms->pool, arg);
    222     rv = gnutls_certificate_set_x509_trust_file(sc->certs,
    223                                                 file, GNUTLS_X509_FMT_PEM);
    224    
     224    apr_pool_create(&spool, parms->pool);
     225
     226    file = ap_server_root_relative(spool, arg);
     227
     228    sc->ca_list_size = 16;
     229
     230    load_datum_from_file(spool, file, &data);
     231
     232    rv = gnutls_x509_crt_list_import(sc->ca_list, &sc->ca_list_size,
     233                                     &data, GNUTLS_X509_FMT_PEM,
     234                                     GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED);
    225235    if (rv < 0) {
    226236        return apr_psprintf(parms->pool, "GnuTLS: Failed to load "
     
    228238                            gnutls_strerror(rv));   
    229239    }
     240
     241    apr_pool_destroy(spool);
    230242    return NULL;
    231243}
Note: See TracChangeset for help on using the changeset viewer.