35f13ec8c22173797e85ab5fa288fd81a88f5439
[openssl.git] / doc / crypto / X509_NAME_ENTRY_get_object.pod
1 =pod
2
3 X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
4 X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
5 X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
6 X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions
7
8 =head1 NAME
9
10 =head1 SYNOPSIS
11
12 ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
13 ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
14
15 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
16 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, unsigned char *bytes, int len);
17
18 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, char *field, int type, unsigned char *bytes, int len);
19 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len);
20 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type,unsigned char *bytes, int len);
21
22 =head1 DESCRIPTION
23
24 X509_NAME_ENTRY_get_object() retrieves the field name of B<ne> in
25 and B<ASN1_OBJECT> structure.
26
27 X509_NAME_ENTRY_get_data() retrieves the field value of B<ne> in
28 and B<ASN1_STRING> structure.
29
30 X509_NAME_ENTRY_set_object() sets the field name of B<ne> to B<obj>.
31
32 X509_NAME_ENTRY_set_data() sets the field value of B<ne> to string type
33 B<type> and value determined by B<bytes> and B<len>.
34
35 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID()
36 and X509_NAME_ENTRY_create_by_OBJ() create and return an 
37 B<X509_NAME_ENTRY> structure.
38
39 =head1 NOTES
40
41 X509_NAME_ENTRY_get_object() and X509_NAME_ENTRY_get_data() can be
42 used to examine an B<X509_NAME_ENTRY> function as returned by 
43 X509_NAME_get_entry() for example.
44
45 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID(),
46 and X509_NAME_ENTRY_create_by_OBJ() create and return an 
47
48 X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_OBJ(),
49 X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data()
50 are seldom used in practice because B<X509_NAME_ENTRY> structures
51 are almost always part of B<X509_NAME> structures and the
52 corresponding B<X509_NAME> functions are typically used to
53 create and add new entries in a single operation.
54
55 The arguments of these functions support similar options to the similarly
56 named ones of the corresponding B<X509_NAME> functions such as
57 X509_NAME_add_entry_by_txt(). So for example B<type> can be set to
58 B<MBSTRING_ASC> but in the case of X509_set_data() the field name must be
59 set first so the relevant field information can be looked up internally.
60
61 =head1 RETURN VALUES
62
63 =head1 SEE ALSO
64
65 L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>,
66 L<OBJ_nid2obj(3),OBJ_nid2obj(3)>
67
68 =head1 HISTORY
69
70 TBA
71
72 =cut