diff options
Diffstat (limited to 'src/lib/libcrypto/man/a2d_ASN1_OBJECT.3')
-rw-r--r-- | src/lib/libcrypto/man/a2d_ASN1_OBJECT.3 | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/a2d_ASN1_OBJECT.3 b/src/lib/libcrypto/man/a2d_ASN1_OBJECT.3 new file mode 100644 index 0000000000..8cf6489614 --- /dev/null +++ b/src/lib/libcrypto/man/a2d_ASN1_OBJECT.3 | |||
@@ -0,0 +1,83 @@ | |||
1 | .\" $OpenBSD: a2d_ASN1_OBJECT.3,v 1.1 2021/11/22 14:00:27 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2021 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: November 22 2021 $ | ||
18 | .Dt A2D_ASN1_OBJECT 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm a2d_ASN1_OBJECT | ||
22 | .Nd DER content octets of an ASN.1 object identifier | ||
23 | .Sh SYNOPSIS | ||
24 | .Ft int | ||
25 | .Fo a2d_ASN1_OBJECT | ||
26 | .Fa "unsigned char *der_out" | ||
27 | .Fa "int olen" | ||
28 | .Fa "const char *val_in" | ||
29 | .Fa "int ilen" | ||
30 | .Fc | ||
31 | .Sh DESCRIPTION | ||
32 | .Fn a2d_ASN1_OBJECT | ||
33 | accepts an ASCII string | ||
34 | .Fa val_in | ||
35 | of | ||
36 | .Fa ilen | ||
37 | bytes and interprets it as the numerical form of an ASN.1 object identifier. | ||
38 | It writes the content octets of the DER encoding of the object identifier | ||
39 | to the buffer | ||
40 | .Fa der_out | ||
41 | which is | ||
42 | .Fa olen | ||
43 | bytes long. | ||
44 | The identifier and length octets of the DER encoding are not written. | ||
45 | .Pp | ||
46 | If | ||
47 | .Fa ilen | ||
48 | is \-1, the | ||
49 | .Xr strlen 3 | ||
50 | of | ||
51 | .Fa val_in | ||
52 | is used instead. | ||
53 | .Pp | ||
54 | If | ||
55 | .Fa der_out | ||
56 | is a | ||
57 | .Dv NULL | ||
58 | pointer, writing the content objects is skipped | ||
59 | and only the return value is calculated. | ||
60 | .Sh RETURN VALUES | ||
61 | .Fn a2d_ASN1_OBJECT | ||
62 | returns the number of content octets that were or would be written or 0 if | ||
63 | .Fa ilen | ||
64 | is 0, if | ||
65 | .Fa val_in | ||
66 | is not a valid representation of an object identfier, | ||
67 | if memory allocation fails, or if the number of content octets | ||
68 | would be larger than | ||
69 | .Fa olen . | ||
70 | .Sh SEE ALSO | ||
71 | .Xr ASN1_OBJECT_new 3 , | ||
72 | .Xr i2d_ASN1_OBJECT 3 , | ||
73 | .Xr OBJ_create 3 | ||
74 | .Sh STANDARDS | ||
75 | ITU-T Recommendation X.690, also known as ISO/IEC 8825-1: | ||
76 | Information technology - ASN.1 encoding rules: | ||
77 | Specification of Basic Encoding Rules (BER), Canonical Encoding | ||
78 | Rules (CER) and Distinguished Encoding Rules (DER), | ||
79 | section 8.19: Encoding of an object identifier value | ||
80 | .Sh HISTORY | ||
81 | .Fn a2d_ASN1_OBJECT | ||
82 | first appeared in SSLeay 0.8.0 and has been available since | ||
83 | .Ox 2.4 . | ||