Changeset 06dcf89 in mod_gnutls for src/gnutls_ocsp.c


Ignore:
Timestamp:
Jan 11, 2020, 10:53:18 AM (9 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
9418c1e
Parents:
75f2d96
Message:

mgs_cache_ocsp_response: Require explicit struct mgs_ocsp_data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_ocsp.c

    r75f2d96 r06dcf89  
    643643 * @param s server that needs a new response
    644644 *
     645 * @param req_data struct describing the certificate for which to
     646 * cache a response
     647 *
    645648 * @param cache_expiry If not `NULL`, this `apr_time_t` will be set to
    646649 * the expiration time of the cache entry. Remains unchanged on
     
    650653 */
    651654static apr_status_t mgs_cache_ocsp_response(server_rec *s,
     655                                            struct mgs_ocsp_data *req_data,
    652656                                            apr_time_t *cache_expiry)
    653657{
     
    692696    {
    693697        gnutls_datum_t req;
    694         int ret = mgs_create_ocsp_request(s, sc->ocsp, &req, &nonce);
     698        int ret = mgs_create_ocsp_request(s, req_data, &req, &nonce);
    695699        if (ret == GNUTLS_E_SUCCESS)
    696700        {
     
    708712        }
    709713
    710         rv = do_ocsp_request(tmp, s, sc->ocsp->uri, &req, &resp);
     714        rv = do_ocsp_request(tmp, s, req_data->uri, &req, &resp);
    711715        gnutls_free(req.data);
    712716        if (rv != APR_SUCCESS)
     
    720724
    721725    apr_time_t next_update;
    722     if (check_ocsp_response(s, sc->ocsp, &resp, &next_update,
     726    if (check_ocsp_response(s, req_data, &resp, &next_update,
    723727                            nonce.size ? &nonce : NULL)
    724728        != GNUTLS_E_SUCCESS)
     
    749753
    750754    int r = mgs_cache_store(sc->ocsp_cache, s,
    751                             sc->ocsp->fingerprint, resp, expiry);
     755                            req_data->fingerprint, resp, expiry);
    752756    /* destroy pool, and original copy of the OCSP response with it */
    753757    apr_pool_destroy(tmp);
     
    878882    }
    879883
    880     rv = mgs_cache_ocsp_response(ctxt->c->base_server, NULL);
     884    rv = mgs_cache_ocsp_response(ctxt->c->base_server, sc->ocsp, NULL);
    881885    if (rv != APR_SUCCESS)
    882886    {
     
    10301034     * mgs_get_ocsp_response. */
    10311035    apr_global_mutex_lock(sc->ocsp_mutex);
    1032     apr_status_t rv = mgs_cache_ocsp_response(server, &expiry);
     1036    apr_status_t rv = mgs_cache_ocsp_response(server, sc->ocsp, &expiry);
    10331037
    10341038    apr_interval_time_t next_interval;
Note: See TracChangeset for help on using the changeset viewer.