diff options
Diffstat (limited to 'src/lib/libcrypto/man/RSA_new.3')
| -rw-r--r-- | src/lib/libcrypto/man/RSA_new.3 | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/RSA_new.3 b/src/lib/libcrypto/man/RSA_new.3 index d995ce1234..0b6bcf9740 100644 --- a/src/lib/libcrypto/man/RSA_new.3 +++ b/src/lib/libcrypto/man/RSA_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: RSA_new.3,v 1.9 2018/04/03 21:20:49 tb Exp $ | 1 | .\" $OpenBSD: RSA_new.3,v 1.10 2018/04/18 01:11:45 schwarze Exp $ |
| 2 | .\" OpenSSL doc/man3/RSA_new.pod 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" OpenSSL doc/man3/RSA_new.pod 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" OpenSSL doc/crypto/rsa.pod 35d2e327 Jun 3 16:19:49 2016 -0400 | 3 | .\" OpenSSL doc/crypto/rsa.pod 35d2e327 Jun 3 16:19:49 2016 -0400 |
| 4 | .\" | 4 | .\" |
| @@ -49,17 +49,22 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 51 | .\" |
| 52 | .Dd $Mdocdate: April 3 2018 $ | 52 | .Dd $Mdocdate: April 18 2018 $ |
| 53 | .Dt RSA_NEW 3 | 53 | .Dt RSA_NEW 3 |
| 54 | .Os | 54 | .Os |
| 55 | .Sh NAME | 55 | .Sh NAME |
| 56 | .Nm RSA_new , | 56 | .Nm RSA_new , |
| 57 | .Nm RSA_up_ref , | ||
| 57 | .Nm RSA_free | 58 | .Nm RSA_free |
| 58 | .Nd allocate and free RSA objects | 59 | .Nd allocate and free RSA objects |
| 59 | .Sh SYNOPSIS | 60 | .Sh SYNOPSIS |
| 60 | .In openssl/rsa.h | 61 | .In openssl/rsa.h |
| 61 | .Ft RSA * | 62 | .Ft RSA * |
| 62 | .Fn RSA_new void | 63 | .Fn RSA_new void |
| 64 | .Ft int | ||
| 65 | .Fo RSA_up_ref | ||
| 66 | .Fa "RSA *rsa" | ||
| 67 | .Fc | ||
| 63 | .Ft void | 68 | .Ft void |
| 64 | .Fo RSA_free | 69 | .Fo RSA_free |
| 65 | .Fa "RSA *rsa" | 70 | .Fa "RSA *rsa" |
| @@ -71,12 +76,19 @@ as defined in PKCS #1 v2.0 (RFC 2437). | |||
| 71 | .Fn RSA_new | 76 | .Fn RSA_new |
| 72 | allocates and initializes an | 77 | allocates and initializes an |
| 73 | .Vt RSA | 78 | .Vt RSA |
| 74 | structure. | 79 | structure, setting the reference count to 1. |
| 75 | It is equivalent to calling | 80 | It is equivalent to calling |
| 76 | .Fn RSA_new_method NULL . | 81 | .Xr RSA_new_method 3 |
| 82 | with a | ||
| 83 | .Dv NULL | ||
| 84 | argument. | ||
| 85 | .Pp | ||
| 86 | .Fn RSA_up_ref | ||
| 87 | increments the reference count by 1. | ||
| 77 | .Pp | 88 | .Pp |
| 78 | .Fn RSA_free | 89 | .Fn RSA_free |
| 79 | frees the | 90 | decrements the reference count by 1. |
| 91 | If it reaches 0, it frees the | ||
| 80 | .Vt RSA | 92 | .Vt RSA |
| 81 | structure and its components. | 93 | structure and its components. |
| 82 | The key is erased before the memory is returned to the system. | 94 | The key is erased before the memory is returned to the system. |
| @@ -149,12 +161,14 @@ returns | |||
| 149 | and sets an error code that can be obtained by | 161 | and sets an error code that can be obtained by |
| 150 | .Xr ERR_get_error 3 . | 162 | .Xr ERR_get_error 3 . |
| 151 | Otherwise it returns a pointer to the newly allocated structure. | 163 | Otherwise it returns a pointer to the newly allocated structure. |
| 164 | .Pp | ||
| 165 | .Fn RSA_up_ref | ||
| 166 | returns 1 for success or 0 for failure. | ||
| 152 | .Sh SEE ALSO | 167 | .Sh SEE ALSO |
| 153 | .Xr BN_new 3 , | 168 | .Xr BN_new 3 , |
| 154 | .Xr d2i_RSAPublicKey 3 , | 169 | .Xr d2i_RSAPublicKey 3 , |
| 155 | .Xr DH_new 3 , | 170 | .Xr DH_new 3 , |
| 156 | .Xr DSA_new 3 , | 171 | .Xr DSA_new 3 , |
| 157 | .Xr engine 3 , | ||
| 158 | .Xr ERR_get_error 3 , | 172 | .Xr ERR_get_error 3 , |
| 159 | .Xr EVP_PKEY_set1_RSA 3 , | 173 | .Xr EVP_PKEY_set1_RSA 3 , |
| 160 | .Xr RSA_blinding_on 3 , | 174 | .Xr RSA_blinding_on 3 , |
| @@ -181,3 +195,7 @@ and | |||
| 181 | .Fn RSA_free | 195 | .Fn RSA_free |
| 182 | appeared in SSLeay 0.4 or earlier and have been available since | 196 | appeared in SSLeay 0.4 or earlier and have been available since |
| 183 | .Ox 2.4 . | 197 | .Ox 2.4 . |
| 198 | .Pp | ||
| 199 | .Fn RSA_up_ref | ||
| 200 | first appeared in OpenSSL 0.9.7 and has been available since | ||
| 201 | .Ox 3.2 . | ||
