- Timestamp:
- Jan 12, 2020, 5:27:45 AM (13 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- a3e0f7b
- Parents:
- 587642d
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r587642d r845c112 414 414 gnutls_ocsp_data_st *resp = 415 415 apr_palloc(ctxt->c->pool, 416 sizeof(gnutls_ocsp_data_st) 417 * (ctxt->sc->certs_x509_chain_num - 1)); 416 sizeof(gnutls_ocsp_data_st) * ctxt->sc->ocsp_num); 418 417 419 418 for (unsigned int i = 0; i < ctxt->sc->ocsp_num; i++) -
src/gnutls_ocsp.c
r587642d r845c112 1009 1009 /** 1010 1010 * Perform an asynchronous OCSP cache update. This is a callback for 1011 * mod_watchdog, so the API is fixed .1011 * mod_watchdog, so the API is fixed (except the meaning of data). 1012 1012 * 1013 1013 * @param state watchdog state (starting/running/stopping) … … 1026 1026 return APR_SUCCESS; 1027 1027 1028 server_rec *server = (server_rec *) data; 1028 mgs_ocsp_data_t ocsp_data = (mgs_ocsp_data_t) data; 1029 server_rec *server = (server_rec *) ocsp_data->server; 1029 1030 mgs_srvconf_rec *sc = (mgs_srvconf_rec *) 1030 1031 ap_get_module_config(server->module_config, &gnutls_module); … … 1040 1041 * mgs_get_ocsp_response. */ 1041 1042 apr_global_mutex_lock(sc->ocsp_mutex); 1042 apr_status_t rv = mgs_cache_ocsp_response(server, sc->ocsp[0], &expiry);1043 apr_status_t rv = mgs_cache_ocsp_response(server, ocsp_data, &expiry); 1043 1044 1044 1045 apr_interval_time_t next_interval; … … 1092 1093 sc->singleton_wd->set_callback_interval(sc->singleton_wd->wd, 1093 1094 next_interval, 1094 server, mgs_async_ocsp_update);1095 ocsp_data, mgs_async_ocsp_update); 1095 1096 1096 1097 ap_log_error(APLOG_MARK, rv == APR_SUCCESS ? APLOG_DEBUG : APLOG_WARNING, … … 1114 1115 1115 1116 apr_status_t rv = mgs_cache_fetch(sc->ocsp_cache, server, 1116 sc->ocsp[0]->fingerprint,1117 ocsp_data->fingerprint, 1117 1118 &ocsp_response, 1118 1119 pool); … … 1123 1124 "Caching OCSP request failure for %s:%d.", 1124 1125 server->server_hostname, server->addrs->host_port); 1125 mgs_cache_ocsp_failure(server, sc->ocsp[0],1126 mgs_cache_ocsp_failure(server, ocsp_data, 1126 1127 sc->ocsp_failure_timeout * 2); 1127 1128 } … … 1141 1142 { 1142 1143 ocsp->cert = sc->certs_x509_crt_chain[idx]; 1144 ocsp->server = server; 1143 1145 1144 1146 ocsp->uri = mgs_cert_get_ocsp_uri(pconf, ocsp->cert); … … 1292 1294 && sc->ocsp_auto_refresh == GNUTLS_ENABLED_TRUE) 1293 1295 { 1294 apr_status_t rv = 1295 sc->singleton_wd->register_callback(sc->singleton_wd->wd, 1296 sc->ocsp_cache_time, 1297 server, mgs_async_ocsp_update); 1298 if (rv == APR_SUCCESS) 1299 ap_log_error(APLOG_MARK, APLOG_INFO, rv, server, 1300 "Enabled async OCSP update via watchdog " 1301 "for %s:%d", 1302 server->server_hostname, server->addrs->host_port); 1303 else 1304 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, server, 1305 "Enabling async OCSP update via watchdog " 1306 "for %s:%d failed!", 1307 server->server_hostname, server->addrs->host_port); 1296 /* register an update callback for each certificate configured 1297 * for stapling */ 1298 for (unsigned int i = 0; i < sc->ocsp_num; i++) 1299 { 1300 apr_status_t rv = 1301 sc->singleton_wd->register_callback(sc->singleton_wd->wd, 1302 sc->ocsp_cache_time, 1303 sc->ocsp[i], 1304 mgs_async_ocsp_update); 1305 if (rv == APR_SUCCESS) 1306 ap_log_error(APLOG_MARK, APLOG_INFO, rv, server, 1307 "Enabled async OCSP update via watchdog " 1308 "for %s:%d, cert[%u]", 1309 server->server_hostname, server->addrs->host_port, 1310 i); 1311 else 1312 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, server, 1313 "Enabling async OCSP update via watchdog " 1314 "for %s:%d, cert[%u] failed!", 1315 server->server_hostname, server->addrs->host_port, 1316 i); 1317 } 1308 1318 } 1309 1319 -
src/gnutls_ocsp.h
r587642d r845c112 52 52 * response. */ 53 53 gnutls_datum_t fingerprint; 54 /** Server (virtual host) that uses the certificate */ 55 server_rec *server; 54 56 }; 55 57
Note: See TracChangeset
for help on using the changeset viewer.