1gnutls_x509_crt_get_dn_by_oid(3) gnutls gnutls_x509_crt_get_dn_by_oid(3)
2
3
4
6 gnutls_x509_crt_get_dn_by_oid - API function
7
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 * sizeof_buf);
13
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 zero 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 * sizeof_buf
30 initially holds the size of buf
31
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 RFC2253. 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 zero, this function will only return known OIDs as text.
40 Other OIDs will be DER encoded, as described in RFC2253 -- in hex for‐
41 mat with a 'using gnutls_x509_dn_oid_known().
42
43 If buf is null then only the size will be filled.
44
46 GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough,
47 and in that case the *sizeof_buf will be updated with the required
48 size. On success 0 is returned.
49
51 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
52 http://www.gnu.org/software/gnutls/ General help using GNU software:
53 http://www.gnu.org/gethelp/
54
56 Copyright © 2008 Free Software Foundation.
57 Copying and distribution of this file, with or without modification,
58 are permitted in any medium without royalty provided the copyright
59 notice and this notice are preserved.
60
62 The full documentation for gnutls is maintained as a Texinfo manual.
63 If the info and gnutls programs are properly installed at your site,
64 the command
65
66 info gnutls
67
68 should give you access to the complete manual.
69
70
71
72gnutls 2.12.6.1 gnutls_x509_crt_get_dn_by_oid(3)