Blame doc/manpages/gnutls_x509_crt_get_subject_alt_name.3

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