1gnutls_certificate_set_ogcnsupt_lsst_acteurst_irfegiqncuuaettslets__sfeutn_cotcisopn_2s(t3a)tus_request_function2(3)
2
3
4
6 gnutls_certificate_set_ocsp_status_request_function2 - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_certificate_set_ocsp_status_request_function2(gnutls_cer‐
12 tificate_credentials_t sc, unsigned idx, gnutls_sta‐
13 tus_request_ocsp_func ocsp_func, void * ptr);
14
16 gnutls_certificate_credentials_t sc
17 is a gnutls_certificate_credentials_t type.
18
19 unsigned idx
20 is a certificate index as returned by gnutls_certifi‐
21 cate_set_key() and friends
22
23 gnutls_status_request_ocsp_func ocsp_func
24 function pointer to OCSP status request callback.
25
26 void * ptr opaque pointer passed to callback function
27
29 This function is to be used by server to register a callback to provide
30 OCSP status requests that correspond to the indexed certificate chain
31 from the client. The callback will be invoked if the client supplied a
32 status-request OCSP extension.
33
34 The callback function prototype is:
35
36 typedef int (*gnutls_status_request_ocsp_func) (gnutls_session_t ses‐
37 sion, void *ptr, gnutls_datum_t *ocsp_response);
38
39 The callback will be invoked if the client requests an OCSP certificate
40 status. The callback may return GNUTLS_E_NO_CERTIFICATE_STATUS, if
41 there is no recent OCSP response. If the callback returns GNUTLS_E_SUC‐
42 CESS, it is expected to have the ocsp_response field set with a valid
43 (DER-encoded) OCSP response. The response must be a value allocated
44 using gnutls_malloc(), and will be deinitialized by the caller.
45
47 the ability to set multiple OCSP responses per credential structure via
48 the index idx was added in version 3.5.6. To keep backwards compati‐
49 bility, it requires using gnutls_certificate_set_flags() with the
50 GNUTLS_CERTIFICATE_API_V2 flag to make the set certificate functions
51 return an index usable by this function.
52
54 On success, GNUTLS_E_SUCCESS [22m(0) is returned, otherwise a negative
55 error code is returned.
56
58 3.5.5
59
61 Report bugs to <bugs@gnutls.org>.
62 Home page: http://www.gnutls.org
63
64
66 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
67 Copying and distribution of this file, with or without modification,
68 are permitted in any medium without royalty provided the copyright
69 notice and this notice are preserved.
70
72 The full documentation for gnutls is maintained as a Texinfo manual.
73 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
74 visit
75
76 http://www.gnutls.org/manual/
77
78gnutls gnutls_certifi3c.a6t.e5_set_ocsp_status_request_function2(3)