Debian Codegraph @

upstream/debian-unstable/man3/X509_NAME_ENTRY_get_object.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "X509_NAME_ENTRY_GET_OBJECT 3SSL"
58 .TH X509_NAME_ENTRY_GET_OBJECT 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
65 X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
66 X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
67 X509_NAME_ENTRY_create_by_OBJ \- X509_NAME_ENTRY utility functions
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& #include <openssl/x509.h>
72 \&
73 \& ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
74 \& ASN1_STRING *X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
75 \&
76 \& int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj);
77 \& int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
78 \& const unsigned char *bytes, int len);
79 \&
80 \& X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field,
81 \& int type, const unsigned char *bytes,
82 \& int len);
83 \& X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
84 \& int type, const unsigned char *bytes,
85 \& int len);
86 \& X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
87 \& const ASN1_OBJECT *obj, int type,
88 \& const unsigned char *bytes, int len);
89 .Ve
90 .SH DESCRIPTION
91 .IX Header "DESCRIPTION"
92 \&\fBX509_NAME_ENTRY_get_object()\fR retrieves the field name of \fBne\fR in
93 and \fBASN1_OBJECT\fR structure.
94 .PP
95 \&\fBX509_NAME_ENTRY_get_data()\fR retrieves the field value of \fBne\fR in
96 and \fBASN1_STRING\fR structure.
97 .PP
98 \&\fBX509_NAME_ENTRY_set_object()\fR sets the field name of \fBne\fR to \fBobj\fR.
99 .PP
100 \&\fBX509_NAME_ENTRY_set_data()\fR sets the field value of \fBne\fR to string type
101 \&\fBtype\fR and value determined by \fBbytes\fR and \fBlen\fR.
102 .PP
103 \&\fBX509_NAME_ENTRY_create_by_txt()\fR, \fBX509_NAME_ENTRY_create_by_NID()\fR
104 and \fBX509_NAME_ENTRY_create_by_OBJ()\fR create and return an
105 \&\fBX509_NAME_ENTRY\fR structure.
106 .SH NOTES
107 .IX Header "NOTES"
108 \&\fBX509_NAME_ENTRY_get_object()\fR and \fBX509_NAME_ENTRY_get_data()\fR can be
109 used to examine an \fBX509_NAME_ENTRY\fR function as returned by
110 \&\fBX509_NAME_get_entry()\fR for example.
111 .PP
112 \&\fBX509_NAME_ENTRY_create_by_txt()\fR, \fBX509_NAME_ENTRY_create_by_OBJ()\fR,
113 \&\fBX509_NAME_ENTRY_create_by_NID()\fR and \fBX509_NAME_ENTRY_set_data()\fR
114 are seldom used in practice because \fBX509_NAME_ENTRY\fR structures
115 are almost always part of \fBX509_NAME\fR structures and the
116 corresponding \fBX509_NAME\fR functions are typically used to
117 create and add new entries in a single operation.
118 .PP
119 The arguments of these functions support similar options to the similarly
120 named ones of the corresponding \fBX509_NAME\fR functions such as
121 \&\fBX509_NAME_add_entry_by_txt()\fR. So for example \fBtype\fR can be set to
122 \&\fBMBSTRING_ASC\fR but in the case of \fBX509_set_data()\fR the field name must be
123 set first so the relevant field information can be looked up internally.
124 .SH "RETURN VALUES"
125 .IX Header "RETURN VALUES"
126 \&\fBX509_NAME_ENTRY_get_object()\fR returns a valid \fBASN1_OBJECT\fR structure if it is
127 set or NULL if an error occurred.
128 .PP
129 \&\fBX509_NAME_ENTRY_get_data()\fR returns a valid \fBASN1_STRING\fR structure if it is set
130 or NULL if an error occurred.
131 .PP
132 \&\fBX509_NAME_ENTRY_set_object()\fR and \fBX509_NAME_ENTRY_set_data()\fR return 1 on success
133 or 0 on error.
134 .PP
135 \&\fBX509_NAME_ENTRY_create_by_txt()\fR, \fBX509_NAME_ENTRY_create_by_NID()\fR and
136 \&\fBX509_NAME_ENTRY_create_by_OBJ()\fR return a valid \fBX509_NAME_ENTRY\fR on success or
137 NULL if an error occurred.
138 .SH "SEE ALSO"
139 .IX Header "SEE ALSO"
140 \&\fBERR_get_error\fR\|(3), \fBd2i_X509_NAME\fR\|(3),
141 \&\fBOBJ_nid2obj\fR\|(3)
142 .SH COPYRIGHT
143 .IX Header "COPYRIGHT"
144 Copyright 2002\-2018 The OpenSSL Project Authors. All Rights Reserved.
145 .PP
146 Licensed under the Apache License 2.0 (the "License"). You may not use
147 this file except in compliance with the License. You can obtain a copy
148 in the file LICENSE in the source distribution or at
149 <https://www.openssl.org/source/license.html>.