File: gnutls_ocsp_resp_verify

package info (click to toggle)
gnutls28 3.3.8-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 51,388 kB
  • sloc: ansic: 191,357; asm: 60,370; sh: 21,457; makefile: 5,257; lisp: 1,531; yacc: 1,254; cpp: 1,155; perl: 199; sed: 16
file content (35 lines) | stat: -rw-r--r-- 1,557 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35




@deftypefun {int} {gnutls_ocsp_resp_verify} (gnutls_ocsp_resp_t @var{resp}, gnutls_x509_trust_list_t @var{trustlist}, unsigned int * @var{verify}, unsigned int @var{flags})
@var{resp}: should contain a @code{gnutls_ocsp_resp_t}  structure

@var{trustlist}: trust anchors as a @code{gnutls_x509_trust_list_t}  structure

@var{verify}: output variable with verification status, an @code{gnutls_ocsp_cert_status_t} 

@var{flags}: verification flags, 0 for now.

Verify signature of the Basic OCSP Response against the public key
in the certificate of a trusted signer.  The  @code{trustlist} should be
populated with trust anchors.  The function will extract the signer
certificate from the Basic OCSP Response and will verify it against
the  @code{trustlist} .  A trusted signer is a certificate that is either
in  @code{trustlist} , or it is signed directly by a certificate in
 @code{trustlist} and has the id-ad-ocspSigning Extended Key Usage bit
set.

The output  @code{verify} variable will hold verification status codes
(e.g., @code{GNUTLS_OCSP_VERIFY_SIGNER_NOT_FOUND} ,
@code{GNUTLS_OCSP_VERIFY_INSECURE_ALGORITHM} ) which are only valid if the
function returned @code{GNUTLS_E_SUCCESS} .

Note that the function returns @code{GNUTLS_E_SUCCESS}  even when
verification failed.  The caller must always inspect the  @code{verify} variable to find out the verification status.

The  @code{flags} variable should be 0 for now.

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
negative error value.
@end deftypefun