1gnutls_x509_crt_get_subject_alt_name(g3n)utglnsutls_x509_crt_get_subject_alt_name(3)
2
3
4

NAME

6       gnutls_x509_crt_get_subject_alt_name - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int  gnutls_x509_crt_get_subject_alt_name(gnutls_x509_crt_t  cert,  un‐
12       signed int seq, void * san, size_t * san_size, unsigned  int  *  criti‐
13       cal);
14

ARGUMENTS

16       gnutls_x509_crt_t cert
17                   should contain a gnutls_x509_crt_t type
18
19       unsigned int seq
20                   specifies  the  sequence  number of the alt name (0 for the
21                   first one, 1 for the second etc.)
22
23       void * san  is the place where the alternative name will be copied to
24
25       size_t * san_size
26                   holds the size of san.
27
28       unsigned int * critical
29                   will be non-zero if the extension  is  marked  as  critical
30                   (may be null)
31

DESCRIPTION

33       This  function retrieves the Alternative Name (2.5.29.17), contained in
34       the given certificate in the X509v3 Certificate Extensions.
35
36       When the SAN type is otherName, it will extract the data in the  other‐
37       Name's  value field, and GNUTLS_SAN_OTHERNAME is returned.  You may use
38       gnutls_x509_crt_get_subject_alt_othername_oid() to get the  correspond‐
39       ing OID and the "virtual" SAN types (e.g., GNUTLS_SAN_OTHERNAME_XMPP).
40
41       If  an otherName OID is known, the data will be decoded.  Otherwise the
42       returned data will be DER encoded, and you will have to decode it your‐
43       self.  Currently, only the RFC 3920 id-on-xmppAddr SAN is recognized.
44

RETURNS

46       the  alternative  subject  name  type on success, one of the enumerated
47       gnutls_x509_subject_alt_name_t.   It  will  return  GNUTLS_E_SHORT_MEM‐
48       ORY_BUFFER if  san_size is not large enough to hold the value.  In that
49       case  san_size will be updated with the required size.  If the certifi‐
50       cate does not have an Alternative name with the specified sequence num‐
51       ber then GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: https://www.gnutls.org
56
57
59       Copyright © 2001- Free Software Foundation, Inc., and others.
60       Copying and distribution of this file, with  or  without  modification,
61       are  permitted in any medium without royalty provided the copyright no‐
62       tice and this notice are preserved.
63

SEE ALSO

65       The full documentation for gnutls is maintained as  a  Texinfo  manual.
66       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
67       visit
68
69       https://www.gnutls.org/manual/
70
71gnutls                               3.7g.n2utls_x509_crt_get_subject_alt_name(3)
Impressum