diff options
author | schwarze <> | 2019-08-26 12:45:27 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-26 12:45:27 +0000 |
commit | bba7eb3ad6eeef5c850d4743aa8f591c8874f803 (patch) | |
tree | 2614f23dcdb446cf2ab22481ca0f9a271610d59c /src | |
parent | c2fb21d5b440bb986631c498969454e1d42d36c4 (diff) | |
download | openbsd-bba7eb3ad6eeef5c850d4743aa8f591c8874f803.tar.gz openbsd-bba7eb3ad6eeef5c850d4743aa8f591c8874f803.tar.bz2 openbsd-bba7eb3ad6eeef5c850d4743aa8f591c8874f803.zip |
document i2a_ASN1_INTEGER(3)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_INTEGER_get.3 | 55 |
1 files changed, 50 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/ASN1_INTEGER_get.3 b/src/lib/libcrypto/man/ASN1_INTEGER_get.3 index ec744b5cdc..72342ec1e0 100644 --- a/src/lib/libcrypto/man/ASN1_INTEGER_get.3 +++ b/src/lib/libcrypto/man/ASN1_INTEGER_get.3 | |||
@@ -1,8 +1,25 @@ | |||
1 | .\" $OpenBSD: ASN1_INTEGER_get.3,v 1.2 2019/06/06 01:06:58 schwarze Exp $ | 1 | .\" $OpenBSD: ASN1_INTEGER_get.3,v 1.3 2019/08/26 12:45:27 schwarze Exp $ |
2 | .\" selective merge up to: | 2 | .\" selective merge up to: |
3 | .\" OpenSSL man3/ASN1_INTEGER_get_int64 eaf39a9f Jun 23 10:24:00 2018 +0200 | 3 | .\" OpenSSL man3/ASN1_INTEGER_get_int64 df75c2bf Dec 9 01:02:36 2018 +0100 |
4 | .\" | 4 | .\" |
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file is a derived work. |
6 | .\" The changes are covered by the following Copyright and license: | ||
7 | .\" | ||
8 | .\" Copyright (c) 2018, 2019 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | 23 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. |
7 | .\" | 24 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | 25 | .\" Redistribution and use in source and binary forms, with or without |
@@ -49,7 +66,7 @@ | |||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
51 | .\" | 68 | .\" |
52 | .Dd $Mdocdate: June 6 2019 $ | 69 | .Dd $Mdocdate: August 26 2019 $ |
53 | .Dt ASN1_INTEGER_GET 3 | 70 | .Dt ASN1_INTEGER_GET 3 |
54 | .Os | 71 | .Os |
55 | .Sh NAME | 72 | .Sh NAME |
@@ -57,6 +74,7 @@ | |||
57 | .Nm ASN1_INTEGER_set , | 74 | .Nm ASN1_INTEGER_set , |
58 | .Nm BN_to_ASN1_INTEGER , | 75 | .Nm BN_to_ASN1_INTEGER , |
59 | .Nm ASN1_INTEGER_to_BN , | 76 | .Nm ASN1_INTEGER_to_BN , |
77 | .Nm i2a_ASN1_INTEGER , | ||
60 | .Nm ASN1_ENUMERATED_get , | 78 | .Nm ASN1_ENUMERATED_get , |
61 | .Nm ASN1_ENUMERATED_set , | 79 | .Nm ASN1_ENUMERATED_set , |
62 | .Nm BN_to_ASN1_ENUMERATED , | 80 | .Nm BN_to_ASN1_ENUMERATED , |
@@ -83,6 +101,11 @@ | |||
83 | .Fa "const ASN1_INTEGER *ai" | 101 | .Fa "const ASN1_INTEGER *ai" |
84 | .Fa "BIGNUM *bn" | 102 | .Fa "BIGNUM *bn" |
85 | .Fc | 103 | .Fc |
104 | .Ft int | ||
105 | .Fo i2a_ASN1_INTEGER | ||
106 | .Fa "BIO *out_bio" | ||
107 | .Fa "const ASN1_INTEGER *a" | ||
108 | .Fc | ||
86 | .Ft long | 109 | .Ft long |
87 | .Fo ASN1_ENUMERATED_get | 110 | .Fo ASN1_ENUMERATED_get |
88 | .Fa "const ASN1_ENUMERATED *a" | 111 | .Fa "const ASN1_ENUMERATED *a" |
@@ -154,6 +177,16 @@ Otherwise, the existing object | |||
154 | .Fa bn | 177 | .Fa bn |
155 | is used instead. | 178 | is used instead. |
156 | .Pp | 179 | .Pp |
180 | .Fn i2a_ASN1_INTEGER | ||
181 | writes a hexadecimal representation of | ||
182 | .Fa a | ||
183 | to | ||
184 | .Fa out_bio . | ||
185 | The output optionally starts with a minus sign, | ||
186 | followed by an even number of upper case ASCII hexadecimal digits. | ||
187 | After each group of 70 digits, a backslash and a linefeed | ||
188 | are inserted before the next digit. | ||
189 | .Pp | ||
157 | .Fn ASN1_ENUMERATED_get , | 190 | .Fn ASN1_ENUMERATED_get , |
158 | .Fn ASN1_ENUMERATED_set , | 191 | .Fn ASN1_ENUMERATED_set , |
159 | .Fn BN_to_ASN1_ENUMERATED , | 192 | .Fn BN_to_ASN1_ENUMERATED , |
@@ -204,6 +237,17 @@ object of | |||
204 | if an error occurs. | 237 | if an error occurs. |
205 | They can fail if the passed type is incorrect (due to a programming error) | 238 | They can fail if the passed type is incorrect (due to a programming error) |
206 | or due to memory allocation failures. | 239 | or due to memory allocation failures. |
240 | .Pp | ||
241 | In case of success, | ||
242 | .Fn i2a_ASN1_INTEGER | ||
243 | returns the total number of bytes written, which is at least 2. | ||
244 | It returns 0 if | ||
245 | .Fa a | ||
246 | is | ||
247 | .Dv NULL | ||
248 | or -1 if | ||
249 | .Xr BIO_write 3 | ||
250 | fails. | ||
207 | .Sh SEE ALSO | 251 | .Sh SEE ALSO |
208 | .Xr ASN1_INTEGER_new 3 | 252 | .Xr ASN1_INTEGER_new 3 |
209 | .Sh HISTORY | 253 | .Sh HISTORY |
@@ -211,8 +255,9 @@ or due to memory allocation failures. | |||
211 | first appeared in SSLeay 0.5.1. | 255 | first appeared in SSLeay 0.5.1. |
212 | .Fn ASN1_INTEGER_get , | 256 | .Fn ASN1_INTEGER_get , |
213 | .Fn BN_to_ASN1_INTEGER , | 257 | .Fn BN_to_ASN1_INTEGER , |
258 | .Fn ASN1_INTEGER_to_BN , | ||
214 | and | 259 | and |
215 | .Fn ASN1_INTEGER_to_BN | 260 | .Fn i2a_ASN1_INTEGER |
216 | first appeared in SSLeay 0.6.0. | 261 | first appeared in SSLeay 0.6.0. |
217 | These functions have been available since | 262 | These functions have been available since |
218 | .Ox 2.3 . | 263 | .Ox 2.3 . |