Debian Codegraph @

doc/functions/gnutls_ocsp_resp_verify

raw
1
2
3
4
5 @deftypefun {int} {gnutls_ocsp_resp_verify} (gnutls_ocsp_resp_const_t @var{resp}, gnutls_x509_trust_list_t @var{trustlist}, unsigned int * @var{verify}, unsigned int @var{flags})
6 @var{resp}: should contain a @code{gnutls_ocsp_resp_t} type
7
8 @var{trustlist}: trust anchors as a @code{gnutls_x509_trust_list_t} type
9
10 @var{verify}: output variable with verification status, an @code{gnutls_ocsp_verify_reason_t}
11
12 @var{flags}: verification flags from @code{gnutls_certificate_verify_flags}
13
14 Verify signature of the Basic OCSP Response against the public key
15 in the certificate of a trusted signer. The @code{trustlist} should be
16 populated with trust anchors. The function will extract the signer
17 certificate from the Basic OCSP Response and will verify it against
18 the @code{trustlist} . A trusted signer is a certificate that is either
19 in @code{trustlist} , or it is signed directly by a certificate in
20 @code{trustlist} and has the id-ad-ocspSigning Extended Key Usage bit
21 set.
22
23 The output @code{verify} variable will hold verification status codes
24 (e.g., @code{GNUTLS_OCSP_VERIFY_SIGNER_NOT_FOUND} ,
25 @code{GNUTLS_OCSP_VERIFY_INSECURE_ALGORITHM} ) which are only valid if the
26 function returned @code{GNUTLS_E_SUCCESS} .
27
28 Note that the function returns @code{GNUTLS_E_SUCCESS} even when
29 verification failed. The caller must always inspect the @code{verify} variable to find out the verification status.
30
31 The @code{flags} variable should be 0 for now.
32
33 @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a
34 negative error value.
35 @end deftypefun