1gnutls_session_set_verify_cert(3)   gnutls   gnutls_session_set_verify_cert(3)
2
3
4

NAME

6       gnutls_session_set_verify_cert - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void   gnutls_session_set_verify_cert(gnutls_session_t  session,  const
12       char * hostname, unsigned flags);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls session
17
18       const char * hostname
19                   is the expected name of the peer; may be NULL
20
21       unsigned flags
22                   flags  for  certificate  verification  --   gnutls_certifi‐
23                   cate_verify_flags
24

DESCRIPTION

26       This  function  instructs GnuTLS to verify the peer's certificate using
27       the provided hostname. If the verification  fails  the  handshake  will
28       also  fail  with  GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR. In that case
29       the verification result can be obtained  using  gnutls_session_get_ver‐
30       ify_cert_status().
31
32       The   hostname  pointer  provided must remain valid for the lifetime of
33       the session. More precisely it should be available  during  any  subse‐
34       quent  handshakes. If no hostname is provided, no hostname verification
35       will be performed. For a  more  advanced  verification  function  check
36       gnutls_session_set_verify_cert2().
37
38       If   flags is provided which contain a profile, this function should be
39       called after any session priority setting functions.
40
41       The gnutls_session_set_verify_cert() function is intended to be used by
42       TLS clients to verify the server's certificate.
43

SINCE

45       3.4.6
46

REPORTING BUGS

48       Report bugs to <bugs@gnutls.org>.
49       Home page: http://www.gnutls.org
50
51
53       Copyright © 2001-2018 Free Software Foundation, Inc., and others.
54       Copying  and  distribution  of this file, with or without modification,
55       are permitted in any medium  without  royalty  provided  the  copyright
56       notice and this notice are preserved.
57

SEE ALSO

59       The  full  documentation  for gnutls is maintained as a Texinfo manual.
60       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
61       visit
62
63       http://www.gnutls.org/manual/
64
65gnutls                               3.6.5   gnutls_session_set_verify_cert(3)
Impressum