1gnutls_certificate_verify_peers2(3) gnutls gnutls_certificate_verify_peers2(3)
2
3
4

NAME

6       gnutls_certificate_verify_peers2 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_certificate_verify_peers2(gnutls_session_t session, unsigned
12       int * status);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls session
17
18       unsigned int * status
19                   is the output of the verification
20

DESCRIPTION

22       This function will verify the peer's certificate and store  the  status
23       in  the  status variable as a bitwise OR of gnutls_certificate_status_t
24       values or zero if the certificate is trusted. Note that value in   sta‐
25       tus is set only when the return value of this function is success (i.e,
26       failure to trust a certificate does not imply a negative return value).
27       The  default verification flags used by this function can be overridden
28       using gnutls_certificate_set_verify_flags().
29
30       This function will take into account the stapled OCSP responses sent by
31       the server, as well as the following X.509 certificate extensions: Name
32       Constraints, Key Usage, and Basic Constraints (pathlen).
33
34       Note that you must also check the peer's name in order to check if  the
35       verified    certificate    belongs    to    the    actual   peer,   see
36       gnutls_x509_crt_check_hostname(),   or   use    gnutls_certificate_ver‐
37       ify_peers3().
38
39       To  avoid denial of service attacks some default upper limits regarding
40       the certificate key size and chain size are set. To override  them  use
41       gnutls_certificate_set_verify_limits().
42
43       Note that when using raw public-keys verification will not work because
44       there is no corresponding certificate body belonging  to  the  raw  key
45       that   can  be  verified.  In  that  case  this  function  will  return
46       GNUTLS_E_INVALID_REQUEST.
47

RETURNS

49       GNUTLS_E_SUCCESS (0) when the validation is performed,  or  a  negative
50       error  code  otherwise.  A successful error code means that the  status
51       parameter must be checked to obtain the validation status.
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: https://www.gnutls.org
56
57
59       Copyright © 2001- Free Software Foundation, Inc., and others.
60       Copying and distribution of this file, with  or  without  modification,
61       are  permitted in any medium without royalty provided the copyright no‐
62       tice and this notice are preserved.
63

SEE ALSO

65       The full documentation for gnutls is maintained as  a  Texinfo  manual.
66       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
67       visit
68
69       https://www.gnutls.org/manual/
70
71gnutls                               3.7.6 gnutls_certificate_verify_peers2(3)
Impressum