1gnutls_x509_crt_get_dn_by_oid(3)    gnutls    gnutls_x509_crt_get_dn_by_oid(3)
2
3
4

NAME

6       gnutls_x509_crt_get_dn_by_oid - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int  gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt_t cert, const char *
12       oid, int indx, unsigned int raw_flag, void * buf, size_t * buf_size);
13

ARGUMENTS

15       gnutls_x509_crt_t cert
16                   should contain a gnutls_x509_crt_t structure
17
18       const char * oid
19                   holds an Object Identified in null terminated string
20
21       int indx    In case multiple same OIDs exist in the RDN, this specifies
22                   which to send. Use (0) to get the first one.
23
24       unsigned int raw_flag
25                   If non-zero returns the raw DER data of the DN part.
26
27       void * buf  a pointer where the DN part will be copied (may be null).
28
29       size_t * buf_size
30                   initially holds the size of  buf
31

DESCRIPTION

33       This function will extract the part of the name of the Certificate sub‐
34       ject specified by the given OID. The output, if the  raw  flag  is  not
35       used,  will  be  encoded as described in RFC4514. Thus a string that is
36       ASCII or UTF-8 encoded, depending on the certificate data.
37
38       Some helper macros with popular OIDs can be found in  gnutls/x509.h  If
39       raw  flag  is  (0),  this function will only return known OIDs as text.
40       Other OIDs will be DER encoded, as described in RFC4514 -- in hex  for‐
41       mat  with  a  '#'  prefix.   You  can  check  about  known  OIDs  using
42       gnutls_x509_dn_oid_known().
43
44       If  buf is null then only the size will be filled. If the  raw_flag  is
45       not specified the output is always null terminated, although the
46        buf_size will not include the null character.
47

RETURNS

49       GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough,
50       and in that case the  buf_size will be updated with the required  size.
51       GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE  if there are no data in the cur‐
52       rent index. On success 0 is returned.
53

REPORTING BUGS

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

SEE ALSO

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