Blame doc/functions/gnutls_certificate_set_ocsp_status_request_mem

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_certificate_set_ocsp_status_request_mem} (gnutls_certificate_credentials_t @var{sc}, const gnutls_datum_t * @var{resp_data}, unsigned @var{idx}, gnutls_x509_crt_fmt_t @var{fmt})
Packit Service 4684c1
@var{sc}: is a credentials structure.
Packit Service 4684c1
Packit Service 4684c1
@var{resp_data}: a memory buffer holding an OCSP response
Packit Service 4684c1
Packit Service 4684c1
@var{idx}: is a certificate index as returned by @code{gnutls_certificate_set_key()}  and friends
Packit Service 4684c1
Packit Service 4684c1
@var{fmt}: is PEM or DER
Packit Service 4684c1
Packit Service 4684c1
This function sets the OCSP responses to be sent to the
Packit Service 4684c1
peer for the certificate chain specified by  @code{idx} . When  @code{fmt} is set
Packit Service 4684c1
to PEM, multiple responses can be loaded.
Packit Service 4684c1
Packit Service 4684c1
@strong{Note:} the ability to set multiple OCSP responses per credential
Packit Service 4684c1
structure via the index  @code{idx} was added in version 3.5.6. To keep
Packit Service 4684c1
backwards compatibility, it requires using @code{gnutls_certificate_set_flags()} 
Packit Service 4684c1
with the @code{GNUTLS_CERTIFICATE_API_V2}  flag to make the set certificate
Packit Service 4684c1
functions return an index usable by this function.
Packit Service 4684c1
Packit Service 4684c1
This function must be called after setting any certificates, and
Packit Service 4684c1
cannot be used for certificates that are provided via a callback --
Packit Service 4684c1
that is when @code{gnutls_certificate_set_retrieve_function()}  is used.
Packit Service 4684c1
Packit Service 4684c1
This function can be called multiple times when multiple responses which
Packit Service 4684c1
apply to the certificate chain are available.
Packit Service 4684c1
If the response provided does not match any certificates present
Packit Service 4684c1
in the chain, the code @code{GNUTLS_E_OCSP_MISMATCH_WITH_CERTS}  is returned.
Packit Service 4684c1
If the response is already expired at the time of loading the code
Packit Service 4684c1
@code{GNUTLS_E_EXPIRED}  is returned.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} On success, the number of loaded responses is returned,
Packit Service 4684c1
otherwise a negative error code.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.6.3
Packit Service 4684c1
@end deftypefun