1X509_NAME_ENTRY_GET_OBJECT(3)       OpenSSL      X509_NAME_ENTRY_GET_OBJECT(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

NOTES

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_OBJ(),
53       X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data() are
54       seldom used in practice because X509_NAME_ENTRY structures are almost
55       always part of X509_NAME structures and the corresponding X509_NAME
56       functions are typically used to create and add new entries in a single
57       operation.
58
59       The arguments of these functions support similar options to the
60       similarly named ones of the corresponding X509_NAME functions such as
61       X509_NAME_add_entry_by_txt(). So for example type can be set to
62       MBSTRING_ASC but in the case of X509_set_data() the field name must be
63       set first so the relevant field information can be looked up
64       internally.
65

RETURN VALUES

67       X509_NAME_ENTRY_get_object() returns a valid ASN1_OBJECT structure if
68       it is set or NULL if an error occurred.
69
70       X509_NAME_ENTRY_get_data() returns a valid ASN1_STRING structure if it
71       is set or NULL if an error occurred.
72
73       X509_NAME_ENTRY_set_object() and X509_NAME_ENTRY_set_data() return 1 on
74       success or 0 on error.
75
76       X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID() and
77       X509_NAME_ENTRY_create_by_OBJ() return a valid X509_NAME_ENTRY on
78       success or NULL if an error occurred.
79

SEE ALSO

81       ERR_get_error(3), d2i_X509_NAME(3), OBJ_nid2obj(3)
82
84       Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
85
86       Licensed under the OpenSSL license (the "License").  You may not use
87       this file except in compliance with the License.  You can obtain a copy
88       in the file LICENSE in the source distribution or at
89       <https://www.openssl.org/source/license.html>.
90
91
92
931.1.1i                            2021-01-26     X509_NAME_ENTRY_GET_OBJECT(3)
Impressum