xref: /openbsd-src/lib/libcrypto/man/d2i_AUTHORITY_KEYID.3 (revision 62a6a2999490bc211aabb8beb54c0cfd5ab48cb1)
1.\"	$OpenBSD: d2i_AUTHORITY_KEYID.3,v 1.2 2018/03/21 16:09:51 schwarze Exp $
2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: March 21 2018 $
18.Dt D2I_AUTHORITY_KEYID 3
19.Os
20.Sh NAME
21.Nm d2i_AUTHORITY_KEYID ,
22.Nm i2d_AUTHORITY_KEYID
23.Nd decode and encode X.509 authority key identifiers
24.Sh SYNOPSIS
25.In openssl/x509v3.h
26.Ft AUTHORITY_KEYID *
27.Fo d2i_AUTHORITY_KEYID
28.Fa "AUTHORITY_KEYID **val_out"
29.Fa "const unsigned char **der_in"
30.Fa "long length"
31.Fc
32.Ft int
33.Fo i2d_AUTHORITY_KEYID
34.Fa "AUTHORITY_KEYID *val_in"
35.Fa "unsigned char **der_out"
36.Fc
37.Sh DESCRIPTION
38.Fn d2i_AUTHORITY_KEYID
39and
40.Fn i2d_AUTHORITY_KEYID
41decode and encode an ASN.1
42.Vt AuthorityKeyIdentifier
43structure  defined in RFC 5280 section 4.2.1.1.
44For details about the semantics, examples, caveats, and bugs, see
45.Xr ASN1_item_d2i 3 .
46.Sh RETURN VALUES
47.Fn d2i_AUTHORITY_KEYID
48returns an
49.Vt AUTHORITY_KEYID
50object or
51.Dv NULL
52if an error occurs.
53.Pp
54.Fn i2d_AUTHORITY_KEYID
55returns the number of bytes successfully encoded or a negative value
56if an error occurs.
57.Sh SEE ALSO
58.Xr ASN1_item_d2i 3 ,
59.Xr AUTHORITY_KEYID_new 3 ,
60.Xr X509_EXTENSION_new 3
61.Sh STANDARDS
62RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
63Certificate Revocation List (CRL) Profile:
64.Bl -dash -compact
65.It
66section 4.2.1.1: Certificate Extensions: Authority Key Identifier
67.It
68section 5.2.1: CRL Extensions: Authority Key Identifier
69.El
70.Sh HISTORY
71.Fn d2i_AUTHORITY_KEYID
72and
73.Fn i2d_AUTHORITY_KEYID
74first appeared in OpenSSL 0.9.2b and have been available since
75.Ox 2.6 .
76