diff options
| author | schwarze <> | 2020-06-19 14:04:25 +0000 |
|---|---|---|
| committer | schwarze <> | 2020-06-19 14:04:25 +0000 |
| commit | 83bc87ccb73f7b599390c49559e4b0e660d98cae (patch) | |
| tree | 74c823c8bfcf49f0ba787aed3d1c2ec190d24a1a | |
| parent | 0386c1149e67fe986d3ffff25147ae4aa48e67b0 (diff) | |
| download | openbsd-83bc87ccb73f7b599390c49559e4b0e660d98cae.tar.gz openbsd-83bc87ccb73f7b599390c49559e4b0e660d98cae.tar.bz2 openbsd-83bc87ccb73f7b599390c49559e4b0e660d98cae.zip | |
document error handling of X509_PUBKEY_get0(3) and X509_PUBKEY_get(3)
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/X509_PUBKEY_new.3 | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/X509_PUBKEY_new.3 b/src/lib/libcrypto/man/X509_PUBKEY_new.3 index 4fc17b4242..69afcb5adb 100644 --- a/src/lib/libcrypto/man/X509_PUBKEY_new.3 +++ b/src/lib/libcrypto/man/X509_PUBKEY_new.3 | |||
| @@ -1,7 +1,24 @@ | |||
| 1 | .\" $OpenBSD: X509_PUBKEY_new.3,v 1.15 2019/06/10 14:58:48 schwarze Exp $ | 1 | .\" $OpenBSD: X509_PUBKEY_new.3,v 1.16 2020/06/19 14:04:25 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
| 8 | .\" | ||
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 11 | .\" copyright notice and this permission notice appear in all copies. | ||
| 12 | .\" | ||
| 13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 20 | .\" | ||
| 21 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. |
| 6 | .\" | 23 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
| @@ -48,7 +65,7 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 67 | .\" |
| 51 | .Dd $Mdocdate: June 10 2019 $ | 68 | .Dd $Mdocdate: June 19 2020 $ |
| 52 | .Dt X509_PUBKEY_NEW 3 | 69 | .Dt X509_PUBKEY_NEW 3 |
| 53 | .Os | 70 | .Os |
| 54 | .Sh NAME | 71 | .Sh NAME |
| @@ -273,6 +290,38 @@ if an error occurs. | |||
| 273 | and | 290 | and |
| 274 | .Fn i2d_PUBKEY_bio | 291 | .Fn i2d_PUBKEY_bio |
| 275 | return 1 for success and 0 if an error occurred. | 292 | return 1 for success and 0 if an error occurred. |
| 293 | .Sh ERRORS | ||
| 294 | After failure of | ||
| 295 | .Fn X509_PUBKEY_get0 | ||
| 296 | or | ||
| 297 | .Fn X509_PUBKEY_get , | ||
| 298 | one of the following diagnostics can be retrieved with | ||
| 299 | .Xr ERR_get_error 3 , | ||
| 300 | .Xr ERR_GET_REASON 3 , | ||
| 301 | and | ||
| 302 | .Xr ERR_reason_error_string 3 : | ||
| 303 | .Bl -tag -width Ds | ||
| 304 | .It Dv X509_R_UNSUPPORTED_ALGORITHM Qq "unsupported algorithm" | ||
| 305 | The public key uses an algorithm unsupported by | ||
| 306 | .Xr EVP_PKEY_set_type 3 . | ||
| 307 | .It X509_R_METHOD_NOT_SUPPORTED Qq "method not supported" | ||
| 308 | While the algorithm is known to | ||
| 309 | .Xr EVP_PKEY_set_type 3 , | ||
| 310 | using it for decoding is not supported. | ||
| 311 | .It X509_R_PUBLIC_KEY_DECODE_ERROR Qq "public key decode error" | ||
| 312 | Decoding the public key failed. | ||
| 313 | .It Dv ERR_R_MALLOC_FAILURE Qq "malloc failure" | ||
| 314 | Memory was exhausted when trying to allocate the new | ||
| 315 | .Vt EVP_PKEY | ||
| 316 | object. | ||
| 317 | .El | ||
| 318 | .Pp | ||
| 319 | If | ||
| 320 | .Fa key | ||
| 321 | is | ||
| 322 | .Dv NULL | ||
| 323 | or does not contain a public key, | ||
| 324 | these functions fail but no error is pushed onto the stack. | ||
| 276 | .Sh SEE ALSO | 325 | .Sh SEE ALSO |
| 277 | .Xr d2i_X509 3 , | 326 | .Xr d2i_X509 3 , |
| 278 | .Xr EVP_PKEY_asn1_set_public 3 , | 327 | .Xr EVP_PKEY_asn1_set_public 3 , |
