Changeset a85de63 in mod_gnutls
- Timestamp:
- Apr 19, 2018, 3:09:04 PM (5 years ago)
- Branches:
- asyncio, debian/master, main, master, proxy-ticket
- Children:
- 103cafa
- Parents:
- c34a68b
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_cache.c
rc34a68b ra85de63 3 3 * Copyright 2008 Nikos Mavrogiannopoulos 4 4 * Copyright 2011 Dash Shendy 5 * Copyright 2015-201 6Fiona Klute5 * Copyright 2015-2018 Fiona Klute 6 6 * 7 7 * Licensed under the Apache License, Version 2.0 (the "License"); … … 326 326 } 327 327 328 static gnutls_datum_t mc_cache_fetch_generic(mgs_handle_t *ctxt, 329 gnutls_datum_t key) 328 static gnutls_datum_t mc_cache_fetch_generic(server_rec *server, 329 gnutls_datum_t key, 330 apr_pool_t *pool) 330 331 { 331 332 gnutls_datum_t data = {NULL, 0}; 332 const char *hex = apr_pescape_hex( ctxt->c->pool, key.data, key.size, 1);333 const char *hex = apr_pescape_hex(pool, key.data, key.size, 1); 333 334 if (hex == NULL) 334 335 return data; 335 336 336 const char *strkey = apr_psprintf( ctxt->c->pool, MC_TAG "%s", hex);337 return mc_cache_fetch( ctxt->c->base_server, strkey, ctxt->c->pool);337 const char *strkey = apr_psprintf(pool, MC_TAG "%s", hex); 338 return mc_cache_fetch(server, strkey, pool); 338 339 } 339 340 … … 454 455 } 455 456 456 static gnutls_datum_t dbm_cache_fetch(mgs_handle_t *ctxt, gnutls_datum_t key) 457 { 458 server_rec *server = ctxt->c->base_server; 459 apr_pool_t *pool = ctxt->c->pool; 457 458 459 static gnutls_datum_t dbm_cache_fetch(server_rec *server, gnutls_datum_t key, 460 apr_pool_t *pool) 461 { 460 462 mgs_srvconf_rec *sc = (mgs_srvconf_rec *) 461 463 ap_get_module_config(server->module_config, &gnutls_module); … … 537 539 return data; 538 540 539 return dbm_cache_fetch(ctxt , dbmkey);541 return dbm_cache_fetch(ctxt->c->base_server, dbmkey, ctxt->c->pool); 540 542 } 541 543 -
src/gnutls_cache.h
rc34a68b ra85de63 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2014 Nikos Mavrogiannopoulos 4 * Copyright 2015-201 6Fiona Klute4 * Copyright 2015-2018 Fiona Klute 5 5 * 6 6 * Licensed under the Apache License, Version 2.0 (the "License"); … … 97 97 * session caching API, and must be released using `gnutls_free()`. 98 98 * 99 * @param ctxt mod_gnutls session context for the request 99 * @param server server context for the request 100 * 100 101 * @param key key for the cache entry to be fetched 102 * 103 * @param pool pool to allocate the response and other temporary 104 * memory from 101 105 * 102 106 * @return the requested cache entry, or `{NULL, 0}` 103 107 */ 104 typedef gnutls_datum_t (*cache_fetch_func)(mgs_handle_t *ctxt, 105 gnutls_datum_t key); 108 typedef gnutls_datum_t (*cache_fetch_func)(server_rec *server, 109 gnutls_datum_t key, 110 apr_pool_t *pool); 106 111 /** 107 112 * Internal cache configuration structure -
src/gnutls_ocsp.c
rc34a68b ra85de63 1 1 /* 2 * Copyright 2016 Fiona Klute2 * Copyright 2016-2018 Fiona Klute 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 772 772 } 773 773 774 *ocsp_response = sc->cache->fetch(ctxt, 775 sc->ocsp->fingerprint); 774 *ocsp_response = ctxt->sc->cache->fetch(ctxt->c->base_server, 775 ctxt->sc->ocsp->fingerprint, 776 ctxt->c->pool); 776 777 if (ocsp_response->size == 0) 777 778 { … … 808 809 * moment there's no good way to integrate that with the 809 810 * Apache Mutex directive. */ 810 *ocsp_response = sc->cache->fetch(ctxt, 811 sc->ocsp->fingerprint); 811 *ocsp_response = ctxt->sc->cache->fetch(ctxt->c->base_server, 812 ctxt->sc->ocsp->fingerprint, 813 ctxt->c->pool); 812 814 if (ocsp_response->size > 0) 813 815 { … … 837 839 838 840 /* retry reading from cache */ 839 *ocsp_response = sc->cache->fetch(ctxt, 840 sc->ocsp->fingerprint); 841 *ocsp_response = ctxt->sc->cache->fetch(ctxt->c->base_server, 842 ctxt->sc->ocsp->fingerprint, 843 ctxt->c->pool); 841 844 if (ocsp_response->size == 0) 842 845 {
Note: See TracChangeset
for help on using the changeset viewer.