1gnutls_x509_crt_set_dn_by_oid(3) gnutls gnutls_x509_crt_set_dn_by_oid(3)
2
3
4
6 gnutls_x509_crt_set_dn_by_oid - API function
7
9 #include <gnutls/x509.h>
10
11 int gnutls_x509_crt_set_dn_by_oid(gnutls_x509_crt_t crt, const char *
12 oid, unsigned int raw_flag, const void * name, unsigned int
13 sizeof_name);
14
16 gnutls_x509_crt_t crt
17 a certificate of type gnutls_x509_crt_t
18
19 const char * oid
20 holds an Object Identifier in a null terminated string
21
22 unsigned int raw_flag
23 must be 0, or 1 if the data are DER encoded
24
25 const void * name
26 a pointer to the name
27
28 unsigned int sizeof_name
29 holds the size of name
30
32 This function will set the part of the name of the Certificate subject,
33 specified by the given OID. The input string should be ASCII or UTF-8
34 encoded.
35
36 Some helper macros with popular OIDs can be found in gnutls/x509.h With
37 this function you can only set the known OIDs. You can test for known
38 OIDs using gnutls_x509_dn_oid_known(). For OIDs that are not known (by
39 gnutls) you should properly DER encode your data, and call this func‐
40 tion with raw_flag set.
41
43 On success, GNUTLS_E_SUCCESS [22m(0) is returned, otherwise a negative
44 error value.
45
47 Report bugs to <bugs@gnutls.org>.
48 Home page: http://www.gnutls.org
49
50
52 Copyright © 2001-2014 Free Software Foundation, Inc..
53 Copying and distribution of this file, with or without modification,
54 are permitted in any medium without royalty provided the copyright
55 notice and this notice are preserved.
56
58 The full documentation for gnutls is maintained as a Texinfo manual.
59 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
60 visit
61
62 http://www.gnutls.org/manual/
63
64gnutls 3.3.29 gnutls_x509_crt_set_dn_by_oid(3)