Blame doc/manpages/gnutls_certificate_verify_peers2.3

Packit aea12f
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit Service 991b93
.TH "gnutls_certificate_verify_peers2" 3 "3.6.14" "gnutls" "gnutls"
Packit aea12f
.SH NAME
Packit aea12f
gnutls_certificate_verify_peers2 \- API function
Packit aea12f
.SH SYNOPSIS
Packit aea12f
.B #include <gnutls/gnutls.h>
Packit aea12f
.sp
Packit aea12f
.BI "int gnutls_certificate_verify_peers2(gnutls_session_t " session ", unsigned int * " status ");"
Packit aea12f
.SH ARGUMENTS
Packit aea12f
.IP "gnutls_session_t session" 12
Packit aea12f
is a gnutls session
Packit aea12f
.IP "unsigned int * status" 12
Packit aea12f
is the output of the verification
Packit aea12f
.SH "DESCRIPTION"
Packit aea12f
This function will verify the peer's certificate and store
Packit aea12f
the status in the  \fIstatus\fP variable as a bitwise OR of gnutls_certificate_status_t
Packit aea12f
values or zero if the certificate is trusted. Note that value in  \fIstatus\fP is set only when the return value of this function is success (i.e, failure 
Packit aea12f
to trust a certificate does not imply a negative return value).
Packit aea12f
The default verification flags used by this function can be overridden
Packit aea12f
using \fBgnutls_certificate_set_verify_flags()\fP.
Packit aea12f
Packit aea12f
This function will take into account the stapled OCSP responses sent by the server,
Packit aea12f
as well as the following X.509 certificate extensions: Name Constraints,
Packit aea12f
Key Usage, and Basic Constraints (pathlen).
Packit aea12f
Packit aea12f
Note that you must also check the peer's name in order to check if
Packit aea12f
the verified certificate belongs to the actual peer, see \fBgnutls_x509_crt_check_hostname()\fP,
Packit aea12f
or use \fBgnutls_certificate_verify_peers3()\fP.
Packit aea12f
Packit aea12f
To avoid denial of service attacks some
Packit aea12f
default upper limits regarding the certificate key size and chain
Packit aea12f
size are set. To override them use \fBgnutls_certificate_set_verify_limits()\fP.
Packit aea12f
Packit aea12f
Note that when using raw public\-keys verification will not work because there is
Packit aea12f
no corresponding certificate body belonging to the raw key that can be verified. In that
Packit aea12f
case this function will return \fBGNUTLS_E_INVALID_REQUEST\fP.
Packit aea12f
.SH "RETURNS"
Packit aea12f
\fBGNUTLS_E_SUCCESS\fP (0) when the validation is performed, or a negative error code otherwise.
Packit aea12f
A successful error code means that the  \fIstatus\fP parameter must be checked to obtain the validation status.
Packit aea12f
.SH "REPORTING BUGS"
Packit aea12f
Report bugs to <bugs@gnutls.org>.
Packit aea12f
.br
Packit aea12f
Home page: https://www.gnutls.org
Packit aea12f
Packit aea12f
.SH COPYRIGHT
Packit Service 991b93
Copyright \(co 2001- Free Software Foundation, Inc., and others.
Packit aea12f
.br
Packit aea12f
Copying and distribution of this file, with or without modification,
Packit aea12f
are permitted in any medium without royalty provided the copyright
Packit aea12f
notice and this notice are preserved.
Packit aea12f
.SH "SEE ALSO"
Packit aea12f
The full documentation for
Packit aea12f
.B gnutls
Packit aea12f
is maintained as a Texinfo manual.
Packit aea12f
If the /usr/share/doc/gnutls/
Packit aea12f
directory does not contain the HTML form visit
Packit aea12f
.B
Packit aea12f
.IP https://www.gnutls.org/manual/
Packit aea12f
.PP