Changeset c39ae1a in mod_gnutls
- Timestamp:
- Oct 30, 2016, 5:43:03 PM (6 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, master, proxy-ticket, upstream
- Children:
- 3475e62
- Parents:
- 0cd8f3d
- Location:
- src
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
r0cd8f3d rc39ae1a 10 10 mod_gnutls_la_CFLAGS = -Wall ${MODULE_CFLAGS} 11 11 mod_gnutls_la_LDFLAGS = -module -avoid-version ${MODULE_LIBS} 12 noinst_HEADERS = gnutls_cache.h gnutls_ ocsp.h gnutls_util.h12 noinst_HEADERS = gnutls_cache.h gnutls_config.h gnutls_ocsp.h gnutls_util.h 13 13 14 14 apmodpkglib_LTLIBRARIES = mod_gnutls.la -
src/gnutls_cache.c
r0cd8f3d rc39ae1a 45 45 #include "gnutls_cache.h" 46 46 #include "mod_gnutls.h" 47 #include "gnutls_config.h" 47 48 48 49 #if HAVE_APR_MEMCACHE … … 695 696 sc->cache_type = mgs_cache_none; 696 697 /* if GnuTLSCacheTimeout was never explicitly set: */ 697 if (sc->cache_timeout == -1)698 if (sc->cache_timeout == MGS_TIMEOUT_UNSET) 698 699 sc->cache_timeout = apr_time_from_sec(MGS_DEFAULT_CACHE_TIMEOUT); 699 700 -
src/gnutls_config.c
r0cd8f3d rc39ae1a 19 19 */ 20 20 21 #include "gnutls_config.h" 21 22 #include "mod_gnutls.h" 22 23 #include "gnutls_ocsp.h" … … 852 853 { 853 854 apr_int64_t argint = apr_atoi64(arg); 855 /* timeouts cannot be negative */ 854 856 if (argint < 0) 855 857 return apr_psprintf(parms->pool, "%s: Invalid argument", … … 1101 1103 1102 1104 sc->priorities_str = NULL; 1103 sc->cache_timeout = -1; /* -1 means "unset" */1105 sc->cache_timeout = MGS_TIMEOUT_UNSET; 1104 1106 sc->cache_type = mgs_cache_unset; 1105 1107 sc->cache_config = NULL; … … 1127 1129 sc->ocsp_response_file = NULL; 1128 1130 sc->ocsp_mutex = NULL; 1129 sc->ocsp_grace_time = apr_time_from_sec(MGS_OCSP_GRACE_TIME);1130 sc->ocsp_failure_timeout = apr_time_from_sec(MGS_OCSP_FAILURE_TIMEOUT);1131 sc->ocsp_socket_timeout = apr_time_from_sec(MGS_OCSP_SOCKET_TIMEOUT);1131 sc->ocsp_grace_time = MGS_TIMEOUT_UNSET; 1132 sc->ocsp_failure_timeout = MGS_TIMEOUT_UNSET; 1133 sc->ocsp_socket_timeout = MGS_TIMEOUT_UNSET; 1132 1134 1133 1135 /* this relies on GnuTLS never changing the gnutls_certificate_request_t enum to define -1 */ … … 1189 1191 gnutls_srvconf_merge(ocsp_staple, GNUTLS_ENABLED_UNSET); 1190 1192 gnutls_srvconf_assign(ocsp_response_file); 1191 gnutls_srvconf_merge(ocsp_grace_time, 1192 apr_time_from_sec(MGS_OCSP_GRACE_TIME)); 1193 gnutls_srvconf_merge(ocsp_failure_timeout, 1194 apr_time_from_sec(MGS_OCSP_FAILURE_TIMEOUT)); 1195 gnutls_srvconf_merge(ocsp_socket_timeout, 1196 apr_time_from_sec(MGS_OCSP_SOCKET_TIMEOUT)); 1193 gnutls_srvconf_merge(ocsp_grace_time, MGS_TIMEOUT_UNSET); 1194 gnutls_srvconf_merge(ocsp_failure_timeout, MGS_TIMEOUT_UNSET); 1195 gnutls_srvconf_merge(ocsp_socket_timeout, MGS_TIMEOUT_UNSET); 1197 1196 1198 1197 gnutls_srvconf_assign(ca_list); -
src/gnutls_ocsp.c
r0cd8f3d rc39ae1a 18 18 #include "mod_gnutls.h" 19 19 #include "gnutls_cache.h" 20 #include "gnutls_config.h" 20 21 #include "gnutls_util.h" 21 22 … … 904 905 } 905 906 907 /* set default values for unset timeouts */ 908 if (sc->ocsp_grace_time == MGS_TIMEOUT_UNSET) 909 sc->ocsp_grace_time = apr_time_from_sec(MGS_OCSP_GRACE_TIME); 910 if (sc->ocsp_failure_timeout == MGS_TIMEOUT_UNSET) 911 sc->ocsp_failure_timeout = apr_time_from_sec(MGS_OCSP_FAILURE_TIMEOUT); 912 if (sc->ocsp_socket_timeout == MGS_TIMEOUT_UNSET) 913 sc->ocsp_socket_timeout = apr_time_from_sec(MGS_OCSP_SOCKET_TIMEOUT); 914 906 915 sc->ocsp = apr_palloc(pconf, sizeof(struct mgs_ocsp_data)); 907 916
Note: See TracChangeset
for help on using the changeset viewer.