Apache2
tls_ocsp.h File Reference

Go to the source code of this file.

Functions

apr_status_t tls_ocsp_prime_certs (tls_conf_global_t *gc, apr_pool_t *p, server_rec *s)
 
apr_status_t tls_ocsp_update_key (conn_rec *c, const rustls_certified_key *certified_key, const rustls_certified_key **key_out)
 

Function Documentation

◆ tls_ocsp_prime_certs()

apr_status_t tls_ocsp_prime_certs ( tls_conf_global_t gc,
apr_pool_t p,
server_rec s 
)

Prime the collected certified keys for OCSP response provisioning (aka. Stapling).

To be called in the post-config phase of the server before connections are handled.

Parameters
gcthe global module configuration with the certified_key registry
pthe pool to use for allocations
sthe base server record

◆ tls_ocsp_update_key()

apr_status_t tls_ocsp_update_key ( conn_rec c,
const rustls_certified_key *  certified_key,
const rustls_certified_key **  key_out 
)

Provide the OCSP response data for the certified_key into the offered buffer, so available. If not data is available out_n is set to 0. Same, if the offered buffer is not large enough to hold the complete response. If OCSP response DER data is copied, the number of copied bytes is given in out_n.

Note that only keys that have been primed initially will have OCSP data available.

Parameters
cthe current connection
certified_keythe key to get the OCSP response data for
bufa buffer which can hold up to buf_len bytes
buf_lenthe length of buf
out_nthe number of OCSP response DER bytes copied or 0.