Changeset 44e8944 in mod_gnutls
- Timestamp:
- Jun 15, 2016, 7:27:39 PM (6 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, master, proxy-ticket, upstream
- Children:
- 7e7d328
- Parents:
- eee1432
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_config.c
reee1432 r44e8944 188 188 apr_pool_create(&spool, ptemp); 189 189 190 sc->cert_pgp = apr_pcalloc(pconf, sizeof(sc->cert_pgp[0]));191 sc->cert_crt_pgp = apr_pcalloc(pconf, sizeof(sc->cert_crt_pgp[0]));192 sc->certs_x509_chain =193 apr_pcalloc(pconf, MAX_CHAIN_SIZE * sizeof(sc->certs_x509_chain[0]));194 sc->certs_x509_crt_chain =195 apr_pcalloc(pconf, MAX_CHAIN_SIZE * sizeof(sc->certs_x509_crt_chain[0]));196 197 190 /* Cleanup function for the GnuTLS structures allocated below */ 198 191 apr_pool_cleanup_register(pconf, sc, mgs_pool_free_credentials, … … 303 296 } 304 297 305 if (sc->x509_cert_file != NULL && sc->certs_x509_crt_chain[0] == NULL) 306 { 298 if (sc->x509_cert_file != NULL && sc->certs_x509_crt_chain == NULL) 299 { 300 sc->certs_x509_chain = 301 apr_pcalloc(pconf, 302 MAX_CHAIN_SIZE * sizeof(sc->certs_x509_chain[0])); 303 sc->certs_x509_crt_chain = 304 apr_pcalloc(pconf, 305 MAX_CHAIN_SIZE * sizeof(sc->certs_x509_crt_chain[0])); 307 306 unsigned int chain_num = MAX_CHAIN_SIZE; 308 307 unsigned format = GNUTLS_X509_FMT_PEM; … … 469 468 } 470 469 471 if (sc->pgp_cert_file) 472 { 470 if (sc->pgp_cert_file && sc->cert_pgp == NULL) 471 { 472 sc->cert_pgp = apr_pcalloc(pconf, sizeof(sc->cert_pgp[0])); 473 sc->cert_crt_pgp = apr_pcalloc(pconf, sizeof(sc->cert_crt_pgp[0])); 474 473 475 if (load_datum_from_file(spool, sc->pgp_cert_file, &data) != 0) { 474 476 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, s, … … 1070 1072 #endif 1071 1073 sc->certs = NULL; 1074 sc->certs_x509_chain = NULL; 1075 sc->certs_x509_crt_chain = NULL; 1072 1076 sc->certs_x509_chain_num = 0; 1073 1077 sc->p11_modules = NULL; 1074 1078 sc->pin = NULL; 1075 1079 1080 sc->cert_pgp = NULL; 1081 sc->cert_crt_pgp = NULL; 1076 1082 sc->privkey_pgp = NULL; 1077 1083 #if GNUTLS_VERSION_NUMBER < 0x030312 -
src/gnutls_hooks.c
reee1432 r44e8944 463 463 if (sc->enabled == GNUTLS_ENABLED_TRUE && 464 464 ((sc->certs_x509_chain_num > 0 && sc->privkey_x509 == NULL) || 465 (sc->cert_crt_pgp[0] != NULL && sc->privkey_pgp == NULL))) { 465 (sc->cert_crt_pgp != NULL && sc->privkey_pgp == NULL))) 466 { 466 467 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, s, 467 468 "GnuTLS: Host '%s:%d' is missing a Private Key File!",
Note: See TracChangeset
for help on using the changeset viewer.