gnutls\_x509\_crt\_get\_subject\_alt\_othername\_oid(3) gnutls gnutls\_x509\_crt\_get\_subject\_alt\_othername\_oid(3)

# [NAME](#NAME)

gnutls\_x509\_crt\_get\_subject\_alt\_othername\_oid - API function

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;gnutls/x509.h&gt;**

**int gnutls\_x509\_crt\_get\_subject\_alt\_othername\_oid(gnutls\_x509\_crt\_t cert, unsigned int seq, void * oid, size\_t * oid\_size);**

# [ARGUMENTS](#ARGUMENTS)

[gnutls\_x509\_crt\_t cert](#gnutls_x509_crt_t)

should contain a **gnutls\_x509\_crt\_t** type

[unsigned int seq](#unsigned)

specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)

[void * oid](#void)

is the place where the otherName OID will be copied to

[size\_t * oid\_size](#size_t)

holds the size of ret.

# [DESCRIPTION](#DESCRIPTION)

This function will extract the type OID of an otherName Subject Alternative Name, contained in the given certificate, and return the type as an enumerated element.

This function is only useful if **gnutls\_x509\_crt\_get\_subject\_alt\_name()** returned **GNUTLS\_SAN\_OTHERNAME**.

If *oid* is null then only the size will be filled. The *oid* returned will be null terminated, although *oid\_size* will not account for the trailing null.

# [RETURNS](#RETURNS)

the alternative subject name type on success, one of the enumerated gnutls\_x509\_subject\_alt\_name\_t. For supported OIDs, it will return one of the virtual (GNUTLS\_SAN\_OTHERNAME\_\*) types, e.g. **GNUTLS\_SAN\_OTHERNAME\_XMPP**, and **GNUTLS\_SAN\_OTHERNAME** for unknown OIDs. It will return **GNUTLS\_E\_SHORT\_MEMORY\_BUFFER** if  
*ian\_size* is not large enough to hold the value. In that case  
*ian\_size* will be updated with the required size. If the certificate does not have an Alternative name with the specified sequence number and with the otherName type then **GNUTLS\_E\_REQUESTED\_DATA\_NOT\_AVAILABLE** is returned.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;bugs@gnutls.org&gt;.  
Home page: https://www.gnutls.org

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2001-2023 Free Software Foundation, Inc., and others.  
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

# [SEE ALSO](#SEE_ALSO)

The full documentation for **gnutls** is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form visit

[https://www.gnutls.org/manual/](https://www.gnutls.org/manual/)

3.8.13 gnutls

---

Document: gnutls_x509_crt_get_subject_alt_othername_oid(3) from gnutls 3.8.13-r3 (Chainguard OS)
Source: https://gitlab.com/gnutls/gnutls
