- Timestamp:
- Dec 8, 2007, 11:07:12 AM (15 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, msva, proxy-ticket, 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)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_config.c
r3b83e00 r5e81262 152 152 } 153 153 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; 160 155 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) { 163 158 return apr_psprintf(parms->pool, "GnuTLS: Failed to Import " 164 159 "Certificate '%s': (%d) %s", file, ret, … … 441 436 sc->srp_tpasswd_file = NULL; 442 437 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; 444 440 sc->cache_timeout = apr_time_from_sec(300); 445 441 sc->cache_type = mgs_cache_dbm; -
src/gnutls_hooks.c
r3b83e00 r5e81262 149 149 150 150 ret->type = GNUTLS_CRT_X509; 151 ret->ncerts = 1;151 ret->ncerts = ctxt->sc->certs_x509_num; 152 152 ret->deinit_all = 0; 153 153 154 ret->cert.x509 = &ctxt->sc->cert_x509;154 ret->cert.x509 = ctxt->sc->certs_x509; 155 155 ret->key.x509 = ctxt->sc->privkey_x509; 156 156 return 0; … … 335 335 } 336 336 337 if (sc->cert _x509== NULL337 if (sc->certs_x509[0] == NULL 338 338 && sc->enabled == GNUTLS_ENABLED_TRUE) { 339 339 ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, … … 354 354 355 355 if (sc->enabled == GNUTLS_ENABLED_TRUE) { 356 rv = read_crt_cn(s, p, sc->cert _x509, &sc->cert_cn);356 rv = read_crt_cn(s, p, sc->certs_x509[0], &sc->cert_cn); 357 357 if (rv < 0) { 358 358 ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, … … 687 687 apr_table_setn(env, "SSL_SESSION_ID", apr_pstrdup(r->pool, tmp)); 688 688 689 mgs_add_common_cert_vars(r, ctxt->sc->cert _x509, 0,689 mgs_add_common_cert_vars(r, ctxt->sc->certs_x509[0], 0, 690 690 ctxt->sc->export_certificates_enabled); 691 691
Note: See TracChangeset
for help on using the changeset viewer.