diff options
| author | schwarze <> | 2018-02-14 23:49:52 +0000 |
|---|---|---|
| committer | schwarze <> | 2018-02-14 23:49:52 +0000 |
| commit | 0e96b32166e48552b13a1ae7d14c24c0c2293283 (patch) | |
| tree | e11b3ae173c723f60d9cc34697a9fb986b1d6dec /src/lib/libcrypto | |
| parent | 0435660a24245c83139431148b3d77477ae5b731 (diff) | |
| download | openbsd-0e96b32166e48552b13a1ae7d14c24c0c2293283.tar.gz openbsd-0e96b32166e48552b13a1ae7d14c24c0c2293283.tar.bz2 openbsd-0e96b32166e48552b13a1ae7d14c24c0c2293283.zip | |
In evp.h rev. 1.54 2018/02/14 16:40:42, jsing@ provided EVP_PKEY_up_ref(3).
Merge the documentation from OpenSSL commits 0c497e96 Dec 14 18:10:16
2015 +0000 and c5ebfcab Mar 7 22:45:58 2016 +0100 with tweaks by me.
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_new.3 | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_new.3 b/src/lib/libcrypto/man/EVP_PKEY_new.3 index 54b863b88f..994e1680b9 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_new.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_new.3 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_new.3,v 1.4 2018/02/14 02:15:46 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_new.3,v 1.5 2018/02/14 23:49:52 schwarze Exp $ |
| 2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d42 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
| 5 | .\" Copyright (c) 2002 The OpenSSL Project. All rights reserved. | 5 | .\" Copyright (c) 2002 The OpenSSL Project. All rights reserved. |
| @@ -53,12 +53,17 @@ | |||
| 53 | .Os | 53 | .Os |
| 54 | .Sh NAME | 54 | .Sh NAME |
| 55 | .Nm EVP_PKEY_new , | 55 | .Nm EVP_PKEY_new , |
| 56 | .Nm EVP_PKEY_up_ref , | ||
| 56 | .Nm EVP_PKEY_free | 57 | .Nm EVP_PKEY_free |
| 57 | .Nd private key allocation functions | 58 | .Nd private key allocation functions |
| 58 | .Sh SYNOPSIS | 59 | .Sh SYNOPSIS |
| 59 | .In openssl/evp.h | 60 | .In openssl/evp.h |
| 60 | .Ft EVP_PKEY * | 61 | .Ft EVP_PKEY * |
| 61 | .Fn EVP_PKEY_new void | 62 | .Fn EVP_PKEY_new void |
| 63 | .Ft int | ||
| 64 | .Fo EVP_PKEY_up_ref | ||
| 65 | .Fa "EVP_PKEY *key" | ||
| 66 | .Fc | ||
| 62 | .Ft void | 67 | .Ft void |
| 63 | .Fo EVP_PKEY_free | 68 | .Fo EVP_PKEY_free |
| 64 | .Fa "EVP_PKEY *key" | 69 | .Fa "EVP_PKEY *key" |
| @@ -74,12 +79,19 @@ The | |||
| 74 | function allocates an empty | 79 | function allocates an empty |
| 75 | .Vt EVP_PKEY | 80 | .Vt EVP_PKEY |
| 76 | structure. | 81 | structure. |
| 82 | The reference count is set to 1. | ||
| 77 | To add a private key to it, use the functions described in | 83 | To add a private key to it, use the functions described in |
| 78 | .Xr EVP_PKEY_set1_RSA 3 . | 84 | .Xr EVP_PKEY_set1_RSA 3 . |
| 79 | .Pp | 85 | .Pp |
| 86 | .Fn EVP_PKEY_up_ref | ||
| 87 | increments the reference count of | ||
| 88 | .Fa key | ||
| 89 | by 1. | ||
| 90 | .Pp | ||
| 80 | .Fn EVP_PKEY_free | 91 | .Fn EVP_PKEY_free |
| 81 | frees up the private key | 92 | decrements the reference count of |
| 82 | .Fa key . | 93 | .Fa key |
| 94 | by 1, and if the reference count reaches zero, frees it up. | ||
| 83 | If | 95 | If |
| 84 | .Fa key | 96 | .Fa key |
| 85 | is a | 97 | is a |
| @@ -92,6 +104,9 @@ returns either the newly allocated | |||
| 92 | structure or | 104 | structure or |
| 93 | .Dv NULL | 105 | .Dv NULL |
| 94 | if an error occurred. | 106 | if an error occurred. |
| 107 | .Pp | ||
| 108 | .Fn EVP_PKEY_up_ref | ||
| 109 | returns 1 for success or 0 for failure. | ||
| 95 | .Sh SEE ALSO | 110 | .Sh SEE ALSO |
| 96 | .Xr EVP_PKEY_asn1_set_free 3 , | 111 | .Xr EVP_PKEY_asn1_set_free 3 , |
| 97 | .Xr EVP_PKEY_set1_RSA 3 | 112 | .Xr EVP_PKEY_set1_RSA 3 |
| @@ -100,3 +115,6 @@ if an error occurred. | |||
| 100 | and | 115 | and |
| 101 | .Fn EVP_PKEY_free | 116 | .Fn EVP_PKEY_free |
| 102 | exist in all versions of OpenSSL. | 117 | exist in all versions of OpenSSL. |
| 118 | .Pp | ||
| 119 | .Fn EVP_PKEY_up_ref | ||
| 120 | first appeared in OpenSSL 1.1.0. | ||
