Fix CVE-2017-6891 in minitasn1 code
[platform/upstream/gnutls.git] / doc / functions / gnutls_x509_crq_get_subject_alt_othername_oid
1
2
3
4
5 @deftypefun {int} {gnutls_x509_crq_get_subject_alt_othername_oid} (gnutls_x509_crq_t @var{crq}, unsigned int @var{seq}, void * @var{ret}, size_t * @var{ret_size})
6 @var{crq}: should contain a @code{gnutls_x509_crq_t}  structure
7
8 @var{seq}: specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.)
9
10 @var{ret}: is the place where the otherName OID will be copied to
11
12 @var{ret_size}: holds the size of ret.
13
14 This function will extract the type OID of an otherName Subject
15 Alternative Name, contained in the given certificate, and return
16 the type as an enumerated element.
17
18 This function is only useful if
19 @code{gnutls_x509_crq_get_subject_alt_name()}  returned
20 @code{GNUTLS_SAN_OTHERNAME} .
21
22 @strong{Returns:} the alternative subject name type on success, one of the
23 enumerated gnutls_x509_subject_alt_name_t.  For supported OIDs,
24 it will return one of the virtual (GNUTLS_SAN_OTHERNAME_*) types,
25 e.g. @code{GNUTLS_SAN_OTHERNAME_XMPP} , and @code{GNUTLS_SAN_OTHERNAME}  for
26 unknown OIDs.  It will return @code{GNUTLS_E_SHORT_MEMORY_BUFFER}  if
27  @code{ret_size} is not large enough to hold the value.  In that case
28  @code{ret_size} will be updated with the required size.  If the
29 certificate does not have an Alternative name with the specified
30 sequence number and with the otherName type then
31 @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE}  is returned.
32
33 @strong{Since:} 2.8.0
34 @end deftypefun