1gnutls_x509_crq_get_dn_by_oid(3) gnutls gnutls_x509_crq_get_dn_by_oid(3)
2
3
4
6 gnutls_x509_crq_get_dn_by_oid - API function
7
9 #include <gnutls/x509.h>
10
11 int gnutls_x509_crq_get_dn_by_oid(gnutls_x509_crq_t crq, const char *
12 oid, int indx, unsigned int raw_flag, void * buf, size_t * buf_size);
13
15 gnutls_x509_crq_t crq
16 should contain a gnutls_x509_crq_t structure
17
18 const char * oid
19 holds an Object Identifier in a null terminated string
20
21 int indx In case multiple same OIDs exist in the RDN, this specifies
22 which to get. 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 to a structure to hold the name (may be NULL)
28
29 size_t * buf_size
30 initially holds the size of buf
31
33 This function will extract the part of the name of the Certificate
34 request subject, specified by the given OID. The output will be encoded
35 as described in RFC2253. The output string will be ASCII or UTF-8
36 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 RFC2253 -- in hex for‐
41 mat with a 'using gnutls_x509_dn_oid_known().
42
44 GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough,
45 and in that case the * buf_size will be updated with the required size.
46 On success 0 is returned.
47
49 Report bugs to <bugs@gnutls.org>.
50 Home page: http://www.gnutls.org
51
52
54 Copyright © 2001-2014 Free Software Foundation, Inc..
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved.
58
60 The full documentation for gnutls is maintained as a Texinfo manual.
61 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
62 visit
63
64 http://www.gnutls.org/manual/
65
66gnutls 3.3.29 gnutls_x509_crq_get_dn_by_oid(3)