Blame doc/manpages/gnutls_x509_crt_get_subject_alt_name.3

Packit aea12f
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit aea12f
.TH "gnutls_x509_crt_get_subject_alt_name" 3 "3.6.8" "gnutls" "gnutls"
Packit aea12f
.SH NAME
Packit aea12f
gnutls_x509_crt_get_subject_alt_name \- API function
Packit aea12f
.SH SYNOPSIS
Packit aea12f
.B #include <gnutls/x509.h>
Packit aea12f
.sp
Packit aea12f
.BI "int gnutls_x509_crt_get_subject_alt_name(gnutls_x509_crt_t " cert ", unsigned int " seq ", void * " san ", size_t * " san_size ", unsigned int * " critical ");"
Packit aea12f
.SH ARGUMENTS
Packit aea12f
.IP "gnutls_x509_crt_t cert" 12
Packit aea12f
should contain a \fBgnutls_x509_crt_t\fP type
Packit aea12f
.IP "unsigned int seq" 12
Packit aea12f
specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)
Packit aea12f
.IP "void * san" 12
Packit aea12f
is the place where the alternative name will be copied to
Packit aea12f
.IP "size_t * san_size" 12
Packit aea12f
holds the size of san.
Packit aea12f
.IP "unsigned int * critical" 12
Packit aea12f
will be non\-zero if the extension is marked as critical (may be null)
Packit aea12f
.SH "DESCRIPTION"
Packit aea12f
This function retrieves the Alternative Name (2.5.29.17), contained
Packit aea12f
in the given certificate in the X509v3 Certificate Extensions.
Packit aea12f
Packit aea12f
When the SAN type is otherName, it will extract the data in the
Packit aea12f
otherName's value field, and \fBGNUTLS_SAN_OTHERNAME\fP is returned.
Packit aea12f
You may use \fBgnutls_x509_crt_get_subject_alt_othername_oid()\fP to get
Packit aea12f
the corresponding OID and the "virtual" SAN types (e.g.,
Packit aea12f
\fBGNUTLS_SAN_OTHERNAME_XMPP\fP).
Packit aea12f
Packit aea12f
If an otherName OID is known, the data will be decoded.  Otherwise
Packit aea12f
the returned data will be DER encoded, and you will have to decode
Packit aea12f
it yourself.  Currently, only the RFC 3920 id\-on\-xmppAddr SAN is
Packit aea12f
recognized.
Packit aea12f
.SH "RETURNS"
Packit aea12f
the alternative subject name type on success, one of the
Packit aea12f
enumerated \fBgnutls_x509_subject_alt_name_t\fP.  It will return
Packit aea12f
\fBGNUTLS_E_SHORT_MEMORY_BUFFER\fP if  \fIsan_size\fP is not large enough to
Packit aea12f
hold the value.  In that case  \fIsan_size\fP will be updated with the
Packit aea12f
required size.  If the certificate does not have an Alternative
Packit aea12f
name with the specified sequence number then
Packit aea12f
\fBGNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE\fP is returned.
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 aea12f
Copyright \(co 2001-2019 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