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 - This function returns the Certificate's
7       distinguished name
8

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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

RETURNS

47       GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough,
48       and  in  that  case  the  *sizeof_buf will be updated with the required
49       size.  On success 0 is returned.
50

REPORTING BUGS

52       Report   bugs   to    <bug-gnutls@gnu.org>.     GnuTLS    home    page:
53       http://www.gnu.org/software/gnutls/  General  help  using GNU software:
54       http://www.gnu.org/gethelp/
55
57       Copyright © 2008 Free Software Foundation.
58       Copying and distribution of this file, with  or  without  modification,
59       are  permitted  in  any  medium  without royalty provided the copyright
60       notice and this notice are preserved.
61

SEE ALSO

63       The full documentation for gnutls is maintained as  a  Texinfo  manual.
64       If  the  info  and gnutls programs are properly installed at your site,
65       the command
66
67              info gnutls
68
69       should give you access to the complete manual.
70
71
72
73gnutls                               2.8.6    gnutls_x509_crt_get_dn_by_oid(3)
Impressum