1gnutls_certificate_verify_peers2(3) gnutls gnutls_certificate_verify_peers2(3)
2
3
4
6 gnutls_certificate_verify_peers2 - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_certificate_verify_peers2(gnutls_session_t session, unsigned
12 int * status);
13
15 gnutls_session_t session
16 is a gnutls session
17
18 unsigned int * status
19 is the output of the verification
20
22 This function will verify the peer's certificate and store the status
23 in the status variable as a bitwise or'd 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 OCSP Certificate Status TLS
31 extension, as well as the following X.509 certificate extensions: Name
32 Constraints, Key Usage, and Basic Constraints (pathlen).
33
34 To avoid denial of service attacks some default upper limits regarding
35 the certificate key size and chain size are set. To override them use
36 gnutls_certificate_set_verify_limits().
37
38 Note that you must also check the peer's name in order to check if the
39 verified certificate belongs to the actual peer, see
40 gnutls_x509_crt_check_hostname(), or use gnutls_certificate_ver‐
41 ify_peers3().
42
44 a negative error code on error and GNUTLS_E_SUCCESS (0) when the peer's
45 certificate was successfully parsed, irrespective of whether it was
46 verified.
47
49 Report bugs to <bugs@gnutls.org>.
50 Home page: http://www.gnutls.org
51
52
54 Copyright © 2001-2014 Free Software Foundation, Inc..
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved.
58
60 The full documentation for gnutls is maintained as a Texinfo manual.
61 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
62 visit
63
64 http://www.gnutls.org/manual/
65
66gnutls 3.3.29 gnutls_certificate_verify_peers2(3)