|
Packit |
549fdc |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
|
|
Packit |
549fdc |
.TH "gnutls_certificate_verify_peers" 3 "3.6.2" "gnutls" "gnutls"
|
|
Packit |
549fdc |
.SH NAME
|
|
Packit |
549fdc |
gnutls_certificate_verify_peers \- API function
|
|
Packit |
549fdc |
.SH SYNOPSIS
|
|
Packit |
549fdc |
.B #include <gnutls/gnutls.h>
|
|
Packit |
549fdc |
.sp
|
|
Packit |
549fdc |
.BI "int gnutls_certificate_verify_peers(gnutls_session_t " session ", gnutls_typed_vdata_st * " data ", unsigned int " elements ", unsigned int * " status ");"
|
|
Packit |
549fdc |
.SH ARGUMENTS
|
|
Packit |
549fdc |
.IP "gnutls_session_t session" 12
|
|
Packit |
549fdc |
is a gnutls session
|
|
Packit |
549fdc |
.IP "gnutls_typed_vdata_st * data" 12
|
|
Packit |
549fdc |
an array of typed data
|
|
Packit |
549fdc |
.IP "unsigned int elements" 12
|
|
Packit |
549fdc |
the number of data elements
|
|
Packit |
549fdc |
.IP "unsigned int * status" 12
|
|
Packit |
549fdc |
is the output of the verification
|
|
Packit |
549fdc |
.SH "DESCRIPTION"
|
|
Packit |
549fdc |
This function will verify the peer's certificate and store the
|
|
Packit |
549fdc |
the status in the \fIstatus\fP variable as a bitwise OR of gnutls_certificate_status_t
|
|
Packit |
549fdc |
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 |
549fdc |
to trust a certificate does not imply a negative return value).
|
|
Packit |
549fdc |
The default verification flags used by this function can be overridden
|
|
Packit |
549fdc |
using \fBgnutls_certificate_set_verify_flags()\fP. See the documentation
|
|
Packit |
549fdc |
of \fBgnutls_certificate_verify_peers2()\fP for details in the verification process.
|
|
Packit |
549fdc |
|
|
Packit |
549fdc |
The acceptable \fIdata\fP types are \fBGNUTLS_DT_DNS_HOSTNAME\fP, \fBGNUTLS_DT_RFC822NAME\fP and \fBGNUTLS_DT_KEY_PURPOSE_OID\fP.
|
|
Packit |
549fdc |
The former two accept as data a null\-terminated hostname or email address, and the latter a null\-terminated
|
|
Packit |
549fdc |
object identifier (e.g., \fBGNUTLS_KP_TLS_WWW_SERVER\fP).
|
|
Packit |
549fdc |
|
|
Packit |
549fdc |
If a DNS hostname is provided then this function will compare
|
|
Packit |
549fdc |
the hostname in the certificate against the given. If names do not match the
|
|
Packit |
549fdc |
\fBGNUTLS_CERT_UNEXPECTED_OWNER\fP status flag will be set.
|
|
Packit |
549fdc |
If a key purpose OID is provided and the end\-certificate contains the extended key
|
|
Packit |
549fdc |
usage PKIX extension, it will be required to be have the provided key purpose
|
|
Packit |
549fdc |
or be marked for any purpose, otherwise verification status will have the
|
|
Packit |
549fdc |
\fBGNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE\fP flag set.
|
|
Packit |
549fdc |
.SH "RETURNS"
|
|
Packit |
549fdc |
\fBGNUTLS_E_SUCCESS\fP (0) when the validation is performed, or a negative error code otherwise.
|
|
Packit |
549fdc |
A successful error code means that the \fIstatus\fP parameter must be checked to obtain the validation status.
|
|
Packit |
549fdc |
.SH "SINCE"
|
|
Packit |
549fdc |
3.3.0
|
|
Packit |
549fdc |
.SH "REPORTING BUGS"
|
|
Packit |
549fdc |
Report bugs to <bugs@gnutls.org>.
|
|
Packit |
549fdc |
.br
|
|
Packit |
549fdc |
Home page: http://www.gnutls.org
|
|
Packit |
549fdc |
|
|
Packit |
549fdc |
.SH COPYRIGHT
|
|
Packit |
549fdc |
Copyright \(co 2001-2018 Free Software Foundation, Inc., and others.
|
|
Packit |
549fdc |
.br
|
|
Packit |
549fdc |
Copying and distribution of this file, with or without modification,
|
|
Packit |
549fdc |
are permitted in any medium without royalty provided the copyright
|
|
Packit |
549fdc |
notice and this notice are preserved.
|
|
Packit |
549fdc |
.SH "SEE ALSO"
|
|
Packit |
549fdc |
The full documentation for
|
|
Packit |
549fdc |
.B gnutls
|
|
Packit |
549fdc |
is maintained as a Texinfo manual.
|
|
Packit |
549fdc |
If the /usr/share/doc/gnutls/
|
|
Packit |
549fdc |
directory does not contain the HTML form visit
|
|
Packit |
549fdc |
.B
|
|
Packit |
549fdc |
.IP http://www.gnutls.org/manual/
|
|
Packit |
549fdc |
.PP
|