Changeset 5e81262 in mod_gnutls for src/gnutls_config.c


Ignore:
Timestamp:
Dec 8, 2007, 11:07:12 AM (12 years ago)
Author:
Nokis Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
ae4a2b0
Parents:
3b83e00
git-author:
Nikos Mavrogiannopoulos <nmav@…> (12/08/07 11:07:12)
git-committer:
Nokis Mavrogiannopoulos <nmav@…> (12/08/07 11:07:12)
Message:

Added support for sending more than one certificate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    r3b83e00 r5e81262  
    152152    }
    153153
    154     ret = gnutls_x509_crt_init(&sc->cert_x509);
    155     if (ret < 0) {
    156         return apr_psprintf(parms->pool, "GnuTLS: Failed to initialize"
    157                             ": (%d) %s", ret, gnutls_strerror(ret));
    158     }
    159 
     154    sc->certs_x509_num = MAX_CHAIN_SIZE;
    160155    ret =
    161         gnutls_x509_crt_import(sc->cert_x509, &data, GNUTLS_X509_FMT_PEM);
    162     if (ret != 0) {
     156        gnutls_x509_crt_list_import(sc->certs_x509, &sc->certs_x509_num, &data, GNUTLS_X509_FMT_PEM, 0);
     157    if (ret < 0) {
    163158        return apr_psprintf(parms->pool, "GnuTLS: Failed to Import "
    164159                            "Certificate '%s': (%d) %s", file, ret,
     
    441436    sc->srp_tpasswd_file = NULL;
    442437    sc->privkey_x509 = NULL;
    443     sc->cert_x509 = NULL;
     438    memset( sc->certs_x509, 0, sizeof(sc->certs_x509));
     439    sc->certs_x509_num = 0;
    444440    sc->cache_timeout = apr_time_from_sec(300);
    445441    sc->cache_type = mgs_cache_dbm;
Note: See TracChangeset for help on using the changeset viewer.