1X509_NAME_ENTRY_GET_OBJECT(3) OpenSSL X509_NAME_ENTRY_GET_OBJECT(3)
2
3
4
6 X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
7 X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
8 X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
9 X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions
10
12 #include <openssl/x509.h>
13
14 ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
15 ASN1_STRING *X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
16
17 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj);
18 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
19 const unsigned char *bytes, int len);
20
21 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field,
22 int type, const unsigned char *bytes,
23 int len);
24 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
25 int type, const unsigned char *bytes,
26 int len);
27 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
28 const ASN1_OBJECT *obj, int type,
29 const unsigned char *bytes, int len);
30
32 X509_NAME_ENTRY_get_object() retrieves the field name of ne in and
33 ASN1_OBJECT structure.
34
35 X509_NAME_ENTRY_get_data() retrieves the field value of ne in and
36 ASN1_STRING structure.
37
38 X509_NAME_ENTRY_set_object() sets the field name of ne to obj.
39
40 X509_NAME_ENTRY_set_data() sets the field value of ne to string type
41 type and value determined by bytes and len.
42
43 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID() and
44 X509_NAME_ENTRY_create_by_OBJ() create and return an X509_NAME_ENTRY
45 structure.
46
48 X509_NAME_ENTRY_get_object() and X509_NAME_ENTRY_get_data() can be used
49 to examine an X509_NAME_ENTRY function as returned by
50 X509_NAME_get_entry() for example.
51
52 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID(), and
53 X509_NAME_ENTRY_create_by_OBJ() create and return an
54
55 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_OBJ(),
56 X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data() are
57 seldom used in practice because X509_NAME_ENTRY structures are almost
58 always part of X509_NAME structures and the corresponding X509_NAME
59 functions are typically used to create and add new entries in a single
60 operation.
61
62 The arguments of these functions support similar options to the
63 similarly named ones of the corresponding X509_NAME functions such as
64 X509_NAME_add_entry_by_txt(). So for example type can be set to
65 MBSTRING_ASC but in the case of X509_set_data() the field name must be
66 set first so the relevant field information can be looked up
67 internally.
68
70 X509_NAME_ENTRY_get_object() returns a valid ASN1_OBJECT structure if
71 it is set or NULL if an error occurred.
72
73 X509_NAME_ENTRY_get_data() returns a valid ASN1_STRING structure if it
74 is set or NULL if an error occurred.
75
76 X509_NAME_ENTRY_set_object() and X509_NAME_ENTRY_set_data() return 1 on
77 success or 0 on error.
78
79 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID() and
80 X509_NAME_ENTRY_create_by_OBJ() return a valid X509_NAME_ENTRY on
81 success or NULL if an error occurred.
82
84 ERR_get_error(3), d2i_X509_NAME(3), OBJ_nid2obj(3)
85
87 Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
88
89 Licensed under the OpenSSL license (the "License"). You may not use
90 this file except in compliance with the License. You can obtain a copy
91 in the file LICENSE in the source distribution or at
92 <https://www.openssl.org/source/license.html>.
93
94
95
961.1.1 2018-09-11 X509_NAME_ENTRY_GET_OBJECT(3)