|
Packit |
aea12f |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
|
|
Packit Service |
991b93 |
.TH "gnutls_certificate_verify_peers" 3 "3.6.14" "gnutls" "gnutls"
|
|
Packit |
aea12f |
.SH NAME
|
|
Packit |
aea12f |
gnutls_certificate_verify_peers \- API function
|
|
Packit |
aea12f |
.SH SYNOPSIS
|
|
Packit |
aea12f |
.B #include <gnutls/gnutls.h>
|
|
Packit |
aea12f |
.sp
|
|
Packit |
aea12f |
.BI "int gnutls_certificate_verify_peers(gnutls_session_t " session ", gnutls_typed_vdata_st * " data ", unsigned int " elements ", unsigned int * " status ");"
|
|
Packit |
aea12f |
.SH ARGUMENTS
|
|
Packit |
aea12f |
.IP "gnutls_session_t session" 12
|
|
Packit |
aea12f |
is a gnutls session
|
|
Packit |
aea12f |
.IP "gnutls_typed_vdata_st * data" 12
|
|
Packit |
aea12f |
an array of typed data
|
|
Packit |
aea12f |
.IP "unsigned int elements" 12
|
|
Packit |
aea12f |
the number of data elements
|
|
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 the
|
|
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. See the documentation
|
|
Packit |
aea12f |
of \fBgnutls_certificate_verify_peers2()\fP for details in the verification process.
|
|
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 |
The acceptable \fIdata\fP types are \fBGNUTLS_DT_DNS_HOSTNAME\fP, \fBGNUTLS_DT_RFC822NAME\fP and \fBGNUTLS_DT_KEY_PURPOSE_OID\fP.
|
|
Packit |
aea12f |
The former two accept as data a null\-terminated hostname or email address, and the latter a null\-terminated
|
|
Packit |
aea12f |
object identifier (e.g., \fBGNUTLS_KP_TLS_WWW_SERVER\fP).
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
If a DNS hostname is provided then this function will compare
|
|
Packit |
aea12f |
the hostname in the certificate against the given. If names do not match the
|
|
Packit |
aea12f |
\fBGNUTLS_CERT_UNEXPECTED_OWNER\fP status flag will be set.
|
|
Packit |
aea12f |
If a key purpose OID is provided and the end\-certificate contains the extended key
|
|
Packit |
aea12f |
usage PKIX extension, it will be required to be have the provided key purpose
|
|
Packit |
aea12f |
or be marked for any purpose, otherwise verification status will have the
|
|
Packit |
aea12f |
\fBGNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE\fP flag set.
|
|
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 "SINCE"
|
|
Packit |
aea12f |
3.3.0
|
|
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
|