![]() |
![]()
| ![]() |
![]()
NAMEgnutls_certificate_set_retrieve_function3 - API function SYNOPSIS#include <gnutls/abstract.h> void gnutls_certificate_set_retrieve_function3(gnutls_certificate_credentials_t cred, gnutls_certificate_retrieve_function3 * func); ARGUMENTS
DESCRIPTIONThis function sets a callback to be called in order to retrieve the certificate and OCSP responses to be used in the handshake. func will be called only if the peer requests a certificate either during handshake or during post-handshake authentication. The callback's function prototype is defined in `abstract.h': int gnutls_certificate_retrieve_function3( gnutls_session_t, const struct gnutls_cert_retr_st *info, gnutls_pcert_st **certs, unsigned int *certs_length, gnutls_ocsp_data_st **ocsp, unsigned int *ocsp_length, gnutls_privkey_t *privkey, unsigned int *flags); The info field of the callback contains:
The callback should fill-in the following values:
If flags in the callback are set to GNUTLS_CERT_RETR_DEINIT_ALL then all provided values must be allocated using gnutls_malloc(), and will be released by gnutls; otherwise they will not be touched by gnutls. The callback function should set the certificate and OCSP response list to be sent, and return 0 on success. If no certificates are available, the certs_length and ocsp_length should be set to zero. The return value (-1) indicates error and the handshake will be terminated. If both certificates are set in the credentials and a callback is available, the callback takes predence. Raw public-keys: In case raw public-keys are negotiated as
certificate type, certificates that would normally hold the public-key
material are not available. In that case,
SINCE3.6.3 REPORTING BUGSReport bugs to <bugs@gnutls.org>.
COPYRIGHTCopyright © 2001-2023 Free Software Foundation, Inc., and
others.
SEE ALSOThe full documentation for gnutls is maintained as a Texinfo manual. If the /usr/local/share/doc/gnutls/ directory does not contain the HTML form visit
|