Changeset cb6476c in mod_gnutls
- Timestamp:
- Sep 26, 2018, 2:29:35 AM (5 years ago)
- Branches:
- asyncio, debian/master, main, master, proxy-ticket
- Children:
- adceac0
- Parents:
- efc43b4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
refc43b4 rcb6476c 658 658 if (sc->client_verify_method == mgs_cvm_unset) 659 659 sc->client_verify_method = mgs_cvm_cartel; 660 if (sc->ocsp_staple == GNUTLS_ENABLED_UNSET) 661 // TODO: Check result of mgs_ocsp_configure_stapling() 662 // below instead, staple if possible. 663 sc->ocsp_staple = GNUTLS_ENABLED_FALSE; 660 661 // TODO: None of the stuff below (and neither some above) 662 // makes sense if sc->enabled == GNUTLS_ENABLED_FALSE, we 663 // should just continue to the next host. All code below could 664 // then safely assume sc->enabled == GNUTLS_ENABLED_TRUE. 664 665 665 666 sc->ocsp_mutex = sc_base->ocsp_mutex; 666 /* init OCSP configuration if OCSP is enabled for this host*/667 if (sc->enabled && sc->ocsp_staple )667 /* init OCSP configuration unless explicitly disabled */ 668 if (sc->enabled && sc->ocsp_staple != GNUTLS_ENABLED_FALSE) 668 669 { 669 670 const char *err = mgs_ocsp_configure_stapling(pconf, ptemp, s); 670 671 if (err != NULL) 671 672 { 672 ap_log_error(APLOG_MARK, APLOG_STARTUP, APR_EINVAL, s, 673 "OCSP stapling configuration failed for " 674 "host '%s:%d': %s", 675 s->server_hostname, s->addrs->host_port, err); 676 return HTTP_INTERNAL_SERVER_ERROR; 673 /* If OCSP stapling is enabled only by default ignore 674 * error and disable stapling */ 675 if (sc->ocsp_staple == GNUTLS_ENABLED_UNSET) 676 { 677 ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, s, 678 "Cannnot enable OCSP stapling for " 679 "host '%s:%d': %s", 680 s->server_hostname, s->addrs->host_port, err); 681 sc->ocsp_staple = GNUTLS_ENABLED_FALSE; 682 } 683 /* If OCSP stapling is explicitly enabled this is a 684 * critical error. */ 685 else 686 { 687 ap_log_error(APLOG_MARK, APLOG_STARTUP, APR_EINVAL, s, 688 "OCSP stapling configuration failed for " 689 "host '%s:%d': %s", 690 s->server_hostname, s->addrs->host_port, err); 691 return HTTP_INTERNAL_SERVER_ERROR; 692 } 677 693 } 678 rv = mgs_ocsp_enable_stapling(pconf, ptemp, s); 679 if (rv != OK && rv != DECLINED) 680 return rv; 694 else 695 { 696 /* Might already be set */ 697 sc->ocsp_staple = GNUTLS_ENABLED_TRUE; 698 /* Set up stapling */ 699 rv = mgs_ocsp_enable_stapling(pconf, ptemp, s); 700 if (rv != OK && rv != DECLINED) 701 return rv; 702 } 681 703 } 682 704 -
test/tests/27_OCSP_server/apache.conf
refc43b4 rcb6476c 9 9 ServerName ${TEST_HOST} 10 10 GnuTLSEnable On 11 GnuTLSOCSPStapling On 11 # Enabled by default 12 #GnuTLSOCSPStapling On 12 13 GnuTLSOCSPCacheTimeout 60 13 14 GnuTLSCertificateFile server/x509-chain.pem
Note: See TracChangeset
for help on using the changeset viewer.