summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/d2i_X509_ATTRIBUTE.3
blob: c8a17571e2f6f76121cc529cda21683b6e37c29f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.\"	$OpenBSD: d2i_X509_ATTRIBUTE.3,v 1.1 2016/12/28 13:45:30 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 28 2016 $
.Dt D2I_X509_ATTRIBUTE 3
.Os
.Sh NAME
.Nm d2i_X509_ATTRIBUTE ,
.Nm i2d_X509_ATTRIBUTE
.\" In the following line, "X.501" and "Attribute" are not typos.
.\" The "Attribute" type is defined in X.501, not in X.509.
.\" The type in called "Attribute" with capital "A", not "attribute".
.Nd decode and encode generic X.501 Attribute
.Sh SYNOPSIS
.In openssl/x509.h
.Ft X509_ATTRIBUTE *
.Fo d2i_X509_ATTRIBUTE
.Fa "X509_ATTRIBUTE **val_out"
.Fa "const unsigned char **der_in"
.Fa "long length"
.Fc
.Ft int
.Fo i2d_X509_ATTRIBUTE
.Fa "X509_ATTRIBUTE *val_in"
.Fa "unsigned char **der_out"
.Fc
.Sh DESCRIPTION
.Fn d2i_X509_ATTRIBUTE
and
.Fn i2d_X509_ATTRIBUTE
decode and encode a generic ASN.1
.Vt Attribute
structure defined in X.501 section 8.2.
For details about the semantics, examples, caveats, and bugs, see
.Xr ASN1_item_d2i 3 .
.Sh RETURN VALUES
.Fn d2i_X509_ATTRIBUTE
returns an
.Vt X509_ATTRIBUTE
object or
.Dv NULL
if an error occurs.
.Pp
.Fn i2d_X509_ATTRIBUTE
returns the number of bytes successfully encoded or a negative value
if an error occurs.
.Sh SEE ALSO
.Xr ASN1_item_d2i 3 ,
.Xr d2i_PKCS12 3 ,
.Xr d2i_PKCS8_PRIV_KEY_INFO 3 ,
.Xr d2i_X509_EXTENSION 3 ,
.Xr d2i_X509_REQ 3 ,
.Xr X509_ATTRIBUTE_new 3
.Sh STANDARDS
ITU-T Recommendation X.501, also known as ISO/IEC 9594-2: Information
Technology  Open Systems Interconnection  The Directory: Models,
section 8.2: Overall structure