5 X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
6 X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
7 X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
8 X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions
12 #include <openssl/x509.h>
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);
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);
21 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field,
22 int type, const unsigned char *bytes,
24 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
25 int type, const unsigned char *bytes,
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);
33 X509_NAME_ENTRY_get_object() retrieves the field name of B<ne> in
34 and B<ASN1_OBJECT> structure.
36 X509_NAME_ENTRY_get_data() retrieves the field value of B<ne> in
37 and B<ASN1_STRING> structure.
39 X509_NAME_ENTRY_set_object() sets the field name of B<ne> to B<obj>.
41 X509_NAME_ENTRY_set_data() sets the field value of B<ne> to string type
42 B<type> and value determined by B<bytes> and B<len>.
44 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID()
45 and X509_NAME_ENTRY_create_by_OBJ() create and return an
46 B<X509_NAME_ENTRY> structure.
50 X509_NAME_ENTRY_get_object() and X509_NAME_ENTRY_get_data() can be
51 used to examine an B<X509_NAME_ENTRY> function as returned by
52 X509_NAME_get_entry() for example.
54 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_OBJ(),
55 X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data()
56 are seldom used in practice because B<X509_NAME_ENTRY> structures
57 are almost always part of B<X509_NAME> structures and the
58 corresponding B<X509_NAME> functions are typically used to
59 create and add new entries in a single operation.
61 The arguments of these functions support similar options to the similarly
62 named ones of the corresponding B<X509_NAME> functions such as
63 X509_NAME_add_entry_by_txt(). So for example B<type> can be set to
64 B<MBSTRING_ASC> but in the case of X509_set_data() the field name must be
65 set first so the relevant field information can be looked up internally.
69 X509_NAME_ENTRY_get_object() returns a valid B<ASN1_OBJECT> structure if it is
70 set or NULL if an error occurred.
72 X509_NAME_ENTRY_get_data() returns a valid B<ASN1_STRING> structure if it is set
73 or NULL if an error occurred.
75 X509_NAME_ENTRY_set_object() and X509_NAME_ENTRY_set_data() return 1 on success
78 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID() and
79 X509_NAME_ENTRY_create_by_OBJ() return a valid B<X509_NAME_ENTRY> on success or
80 NULL if an error occurred.
84 L<ERR_get_error(3)>, L<d2i_X509_NAME(3)>,
89 Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
91 Licensed under the Apache License 2.0 (the "License"). You may not use
92 this file except in compliance with the License. You can obtain a copy
93 in the file LICENSE in the source distribution or at
94 L<https://www.openssl.org/source/license.html>.