Blame doc/manpages/gnutls_certificate_verify_peers.3

Packit Service 4684c1
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit Service 4684c1
.TH "gnutls_certificate_verify_peers" 3 "3.6.14" "gnutls" "gnutls"
Packit Service 4684c1
.SH NAME
Packit Service 4684c1
gnutls_certificate_verify_peers \- API function
Packit Service 4684c1
.SH SYNOPSIS
Packit Service 4684c1
.B #include <gnutls/gnutls.h>
Packit Service 4684c1
.sp
Packit Service 4684c1
.BI "int gnutls_certificate_verify_peers(gnutls_session_t " session ", gnutls_typed_vdata_st * " data ", unsigned int " elements ", unsigned int * " status ");"
Packit Service 4684c1
.SH ARGUMENTS
Packit Service 4684c1
.IP "gnutls_session_t session" 12
Packit Service 4684c1
is a gnutls session
Packit Service 4684c1
.IP "gnutls_typed_vdata_st * data" 12
Packit Service 4684c1
an array of typed data
Packit Service 4684c1
.IP "unsigned int elements" 12
Packit Service 4684c1
the number of data elements
Packit Service 4684c1
.IP "unsigned int * status" 12
Packit Service 4684c1
is the output of the verification
Packit Service 4684c1
.SH "DESCRIPTION"
Packit Service 4684c1
This function will verify the peer's certificate and store the
Packit Service 4684c1
the status in the  \fIstatus\fP variable as a bitwise OR of gnutls_certificate_status_t
Packit Service 4684c1
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 Service 4684c1
to trust a certificate does not imply a negative return value).
Packit Service 4684c1
The default verification flags used by this function can be overridden
Packit Service 4684c1
using \fBgnutls_certificate_set_verify_flags()\fP. See the documentation
Packit Service 4684c1
of \fBgnutls_certificate_verify_peers2()\fP for details in the verification process.
Packit Service 4684c1
Packit Service 4684c1
This function will take into account the stapled OCSP responses sent by the server,
Packit Service 4684c1
as well as the following X.509 certificate extensions: Name Constraints,
Packit Service 4684c1
Key Usage, and Basic Constraints (pathlen).
Packit Service 4684c1
Packit Service 4684c1
The acceptable  \fIdata\fP types are \fBGNUTLS_DT_DNS_HOSTNAME\fP, \fBGNUTLS_DT_RFC822NAME\fP and \fBGNUTLS_DT_KEY_PURPOSE_OID\fP.
Packit Service 4684c1
The former two accept as data a null\-terminated hostname or email address, and the latter a null\-terminated
Packit Service 4684c1
object identifier (e.g., \fBGNUTLS_KP_TLS_WWW_SERVER\fP).
Packit Service 4684c1
Packit Service 4684c1
If a DNS hostname is provided then this function will compare
Packit Service 4684c1
the hostname in the certificate against the given. If names do not match the 
Packit Service 4684c1
\fBGNUTLS_CERT_UNEXPECTED_OWNER\fP status flag will be set.
Packit Service 4684c1
If a key purpose OID is provided and the end\-certificate contains the extended key
Packit Service 4684c1
usage PKIX extension, it will be required to be have the provided key purpose 
Packit Service 4684c1
or be marked for any purpose, otherwise verification status will have the
Packit Service 4684c1
\fBGNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE\fP flag set.
Packit Service 4684c1
Packit Service 4684c1
To avoid denial of service attacks some
Packit Service 4684c1
default upper limits regarding the certificate key size and chain
Packit Service 4684c1
size are set. To override them use \fBgnutls_certificate_set_verify_limits()\fP.
Packit Service 4684c1
Packit Service 4684c1
Note that when using raw public\-keys verification will not work because there is
Packit Service 4684c1
no corresponding certificate body belonging to the raw key that can be verified. In that
Packit Service 4684c1
case this function will return \fBGNUTLS_E_INVALID_REQUEST\fP.
Packit Service 4684c1
.SH "RETURNS"
Packit Service 4684c1
\fBGNUTLS_E_SUCCESS\fP (0) when the validation is performed, or a negative error code otherwise.
Packit Service 4684c1
A successful error code means that the  \fIstatus\fP parameter must be checked to obtain the validation status.
Packit Service 4684c1
.SH "SINCE"
Packit Service 4684c1
3.3.0
Packit Service 4684c1
.SH "REPORTING BUGS"
Packit Service 4684c1
Report bugs to <bugs@gnutls.org>.
Packit Service 4684c1
.br
Packit Service 4684c1
Home page: https://www.gnutls.org
Packit Service 4684c1
Packit Service 4684c1
.SH COPYRIGHT
Packit Service 4684c1
Copyright \(co 2001- Free Software Foundation, Inc., and others.
Packit Service 4684c1
.br
Packit Service 4684c1
Copying and distribution of this file, with or without modification,
Packit Service 4684c1
are permitted in any medium without royalty provided the copyright
Packit Service 4684c1
notice and this notice are preserved.
Packit Service 4684c1
.SH "SEE ALSO"
Packit Service 4684c1
The full documentation for
Packit Service 4684c1
.B gnutls
Packit Service 4684c1
is maintained as a Texinfo manual.
Packit Service 4684c1
If the /usr/share/doc/gnutls/
Packit Service 4684c1
directory does not contain the HTML form visit
Packit Service 4684c1
.B
Packit Service 4684c1
.IP https://www.gnutls.org/manual/
Packit Service 4684c1
.PP