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, unsigned indx, unsigned int raw_flag, void * buf, size_t *
13 buf_size);
14
16 gnutls_x509_crq_t crq
17 should contain a gnutls_x509_crq_t type
18
19 const char * oid
20 holds an Object Identifier in a null terminated string
21
22 unsigned indx
23 In case multiple same OIDs exist in the RDN, this specifies
24 which to get. Use (0) to get the first one.
25
26 unsigned int raw_flag
27 If non-zero returns the raw DER data of the DN part.
28
29 void * buf a pointer to a structure to hold the name (may be NULL)
30
31 size_t * buf_size
32 initially holds the size of buf
33
35 This function will extract the part of the name of the Certificate re‐
36 quest subject, specified by the given OID. The output will be encoded
37 as described in RFC2253. The output string will be ASCII or UTF-8 en‐
38 coded, depending on the certificate data.
39
40 Some helper macros with popular OIDs can be found in gnutls/x509.h If
41 raw flag is (0), this function will only return known OIDs as text.
42 Other OIDs will be DER encoded, as described in RFC2253 -- in hex for‐
43 mat with a 'using gnutls_x509_dn_oid_known().
44
46 GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough,
47 and in that case the * buf_size will be updated with the required size.
48 On success 0 is returned.
49
51 Report bugs to <bugs@gnutls.org>.
52 Home page: https://www.gnutls.org
53
54
56 Copyright © 2001- Free Software Foundation, Inc., and others.
57 Copying and distribution of this file, with or without modification,
58 are permitted in any medium without royalty provided the copyright no‐
59 tice and this notice are preserved.
60
62 The full documentation for gnutls is maintained as a Texinfo manual.
63 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
64 visit
65
66 https://www.gnutls.org/manual/
67
68gnutls 3.7.8 gnutls_x509_crq_get_dn_by_oid(3)