Blame doc/functions/gnutls_certificate_set_ocsp_status_request_function2

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_certificate_set_ocsp_status_request_function2} (gnutls_certificate_credentials_t @var{sc}, unsigned @var{idx}, gnutls_status_request_ocsp_func @var{ocsp_func}, void * @var{ptr})
Packit aea12f
@var{sc}: is a @code{gnutls_certificate_credentials_t}  type.
Packit aea12f
Packit aea12f
@var{idx}: is a certificate index as returned by @code{gnutls_certificate_set_key()}  and friends
Packit aea12f
Packit aea12f
@var{ocsp_func}: function pointer to OCSP status request callback.
Packit aea12f
Packit aea12f
@var{ptr}: opaque pointer passed to callback function
Packit aea12f
Packit aea12f
This function is to be used by server to register a callback to
Packit aea12f
provide OCSP status requests that correspond to the indexed certificate chain
Packit aea12f
from the client.  The callback will be invoked if the client supplied a
Packit aea12f
status-request OCSP extension.
Packit aea12f
Packit aea12f
The callback function prototype is:
Packit aea12f
Packit aea12f
typedef int (*gnutls_status_request_ocsp_func)
Packit aea12f
(gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response);
Packit aea12f
Packit aea12f
The callback will be invoked if the client requests an OCSP certificate
Packit aea12f
status.  The callback may return @code{GNUTLS_E_NO_CERTIFICATE_STATUS} , if
Packit aea12f
there is no recent OCSP response. If the callback returns @code{GNUTLS_E_SUCCESS} ,
Packit aea12f
it is expected to have the  @code{ocsp_response} field set with a valid (DER-encoded)
Packit aea12f
OCSP response. The response must be a value allocated using @code{gnutls_malloc()} ,
Packit aea12f
and will be deinitialized by the caller.
Packit aea12f
Packit aea12f
@strong{Note:} the ability to set multiple OCSP responses per credential
Packit aea12f
structure via the index  @code{idx} was added in version 3.5.6. To keep
Packit aea12f
backwards compatibility, it requires using @code{gnutls_certificate_set_flags()} 
Packit aea12f
with the @code{GNUTLS_CERTIFICATE_API_V2}  flag to make the set certificate
Packit aea12f
functions return an index usable by this function.
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned,
Packit aea12f
otherwise a negative error code is returned.
Packit aea12f
Packit aea12f
@strong{Since:} 3.5.5
Packit aea12f
@end deftypefun