1gnutls_certificate_verify_peers(3)  gnutls  gnutls_certificate_verify_peers(3)
2
3
4

NAME

6       gnutls_certificate_verify_peers - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int      gnutls_certificate_verify_peers(gnutls_session_t      session,
12       gnutls_typed_vdata_st * data, unsigned int  elements,  unsigned  int  *
13       status);
14

ARGUMENTS

16       gnutls_session_t session
17                   is a gnutls session
18
19       gnutls_typed_vdata_st * data
20                   an array of typed data
21
22       unsigned int elements
23                   the number of data elements
24
25       unsigned int * status
26                   is the output of the verification
27

DESCRIPTION

29       This  function  will verify the peer's certificate and store the status
30       in the  status variable as a bitwise  or'd  gnutls_certificate_status_t
31       values  or zero if the certificate is trusted. Note that value in  sta‐
32       tus is set only when the return value of this function is success (i.e,
33       failure to trust a certificate does not imply a negative return value).
34       The default verification flags used by this function can be  overridden
35       using  gnutls_certificate_set_verify_flags().  See the documentation of
36       gnutls_certificate_verify_peers2()  for  details  in  the  verification
37       process.
38
39       The    acceptable     data   types   are   GNUTLS_DT_DNS_HOSTNAME   and
40       GNUTLS_DT_KEY_PURPOSE_OID.  The former accepts as  data  a  null-termi‐
41       nated  hostname,  and  the  latter  a null-terminated object identifier
42       (e.g., GNUTLS_KP_TLS_WWW_SERVER).  If a DNS hostname is  provided  then
43       this  function will compare the hostname in the certificate against the
44       given. If names do not match  the  GNUTLS_CERT_UNEXPECTED_OWNER  status
45       flag  will  be  set.  If a key purpose OID is provided and the end-cer‐
46       tificate contains the extended key usage PKIX  extension,  it  will  be
47       required  to be have the provided key purpose or be marked for any pur‐
48       pose, otherwise verification  will  fail  with  GNUTLS_CERT_SIGNER_CON‐
49       STRAINTS_FAILURE status.
50

RETURNS

52       a negative error code on error and GNUTLS_E_SUCCESS (0) when the peer's
53       certificate was successfully parsed, irrespective  of  whether  it  was
54       verified.
55

SINCE

57       3.3.0
58

REPORTING BUGS

60       Report bugs to <bugs@gnutls.org>.
61       Home page: http://www.gnutls.org
62
63
65       Copyright © 2001-2014 Free Software Foundation, Inc..
66       Copying  and  distribution  of this file, with or without modification,
67       are permitted in any medium  without  royalty  provided  the  copyright
68       notice and this notice are preserved.
69

SEE ALSO

71       The  full  documentation  for gnutls is maintained as a Texinfo manual.
72       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
73       visit
74
75       http://www.gnutls.org/manual/
76
77gnutls                              3.3.29  gnutls_certificate_verify_peers(3)
Impressum