summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-04-18 01:11:45 +0000
committerschwarze <>2018-04-18 01:11:45 +0000
commita4c05ae36d82b4519f2776b36a8f194f93de8968 (patch)
tree7b0061152e4002b12206265090ac4b5906038ae8
parentbf38af2d204a66db252db88697e129c75810d022 (diff)
downloadopenbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.tar.gz
openbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.tar.bz2
openbsd-a4c05ae36d82b4519f2776b36a8f194f93de8968.zip
* Document DH_up_ref(3), DSA_up_ref(3), and RSA_up_ref(3).
* Correct documentation of DH_new(3), DH_free(3), DSA_new(3), DSA_free(3), RSA_new(3), and RSA_free(3) with respect to reference counting. * Stop referencing engine(3).
-rw-r--r--src/lib/libcrypto/man/DH_new.329
-rw-r--r--src/lib/libcrypto/man/DSA_new.330
-rw-r--r--src/lib/libcrypto/man/RSA_new.330
3 files changed, 73 insertions, 16 deletions
diff --git a/src/lib/libcrypto/man/DH_new.3 b/src/lib/libcrypto/man/DH_new.3
index bd3b310561..3208e76701 100644
--- a/src/lib/libcrypto/man/DH_new.3
+++ b/src/lib/libcrypto/man/DH_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DH_new.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: DH_new.3,v 1.8 2018/04/18 01:11:45 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file was written by Ulf Moeller <ulf@openssl.org>.
@@ -48,17 +48,22 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2018 $ 51.Dd $Mdocdate: April 18 2018 $
52.Dt DH_NEW 3 52.Dt DH_NEW 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
55.Nm DH_new , 55.Nm DH_new ,
56.Nm DH_up_ref ,
56.Nm DH_free 57.Nm DH_free
57.Nd allocate and free DH objects 58.Nd allocate and free DH objects
58.Sh SYNOPSIS 59.Sh SYNOPSIS
59.In openssl/dh.h 60.In openssl/dh.h
60.Ft DH* 61.Ft DH*
61.Fn DH_new void 62.Fn DH_new void
63.Ft int
64.Fo DH_up_ref
65.Fa "DH *dh"
66.Fc
62.Ft void 67.Ft void
63.Fo DH_free 68.Fo DH_free
64.Fa "DH *dh" 69.Fa "DH *dh"
@@ -69,10 +74,19 @@ The DH functions implement the Diffie-Hellman key agreement protocol.
69.Fn DH_new 74.Fn DH_new
70allocates and initializes a 75allocates and initializes a
71.Vt DH 76.Vt DH
72structure. 77structure, setting the reference count to 1.
78It is equivalent to
79.Xr DH_new_method 3
80with a
81.Dv NULL
82argument.
83.Pp
84.Fn DH_up_ref
85increments the reference count by 1.
73.Pp 86.Pp
74.Fn DH_free 87.Fn DH_free
75frees the 88decrements the reference count by 1.
89If it reaches 0, it frees the
76.Vt DH 90.Vt DH
77structure and its components. 91structure and its components.
78The values are erased before the memory is returned to the system. 92The values are erased before the memory is returned to the system.
@@ -89,6 +103,9 @@ returns
89and sets an error code that can be obtained by 103and sets an error code that can be obtained by
90.Xr ERR_get_error 3 . 104.Xr ERR_get_error 3 .
91Otherwise it returns a pointer to the newly allocated structure. 105Otherwise it returns a pointer to the newly allocated structure.
106.Pp
107.Fn DH_up_ref
108returns 1 for success or 0 for failure.
92.Sh SEE ALSO 109.Sh SEE ALSO
93.Xr BN_new 3 , 110.Xr BN_new 3 ,
94.Xr d2i_DHparams 3 , 111.Xr d2i_DHparams 3 ,
@@ -108,3 +125,7 @@ and
108.Fn DH_free 125.Fn DH_free
109first appeared in SSLeay 0.5.1 and have been available since 126first appeared in SSLeay 0.5.1 and have been available since
110.Ox 2.4 . 127.Ox 2.4 .
128.Pp
129.Fn DH_up_ref
130first appeared in OpenSSL 0.9.7 and has been available since
131.Ox 3.2 .
diff --git a/src/lib/libcrypto/man/DSA_new.3 b/src/lib/libcrypto/man/DSA_new.3
index 90e9ab6812..357b113b0a 100644
--- a/src/lib/libcrypto/man/DSA_new.3
+++ b/src/lib/libcrypto/man/DSA_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DSA_new.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: DSA_new.3,v 1.10 2018/04/18 01:11:45 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file was written by Ulf Moeller <ulf@openssl.org>.
@@ -48,17 +48,22 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2018 $ 51.Dd $Mdocdate: April 18 2018 $
52.Dt DSA_NEW 3 52.Dt DSA_NEW 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
55.Nm DSA_new , 55.Nm DSA_new ,
56.Nm DSA_up_ref ,
56.Nm DSA_free 57.Nm DSA_free
57.Nd allocate and free DSA objects 58.Nd allocate and free DSA objects
58.Sh SYNOPSIS 59.Sh SYNOPSIS
59.In openssl/dsa.h 60.In openssl/dsa.h
60.Ft DSA* 61.Ft DSA*
61.Fn DSA_new void 62.Fn DSA_new void
63.Ft int
64.Fo DSA_up_ref
65.Fa "DSA *dsa"
66.Fc
62.Ft void 67.Ft void
63.Fo DSA_free 68.Fo DSA_free
64.Fa "DSA *dsa" 69.Fa "DSA *dsa"
@@ -69,12 +74,19 @@ The DSA functions implement the Digital Signature Algorithm.
69.Fn DSA_new 74.Fn DSA_new
70allocates and initializes a 75allocates and initializes a
71.Vt DSA 76.Vt DSA
72structure. 77structure, setting the reference count to 1.
73It is equivalent to calling 78It is equivalent to calling
74.Fn DSA_new_method NULL . 79.Xr DSA_new_method 3
80with a
81.Dv NULL
82argument.
83.Pp
84.Fn DSA_up_ref
85increments the reference count by 1.
75.Pp 86.Pp
76.Fn DSA_free 87.Fn DSA_free
77frees the 88decrements the reference count by 1.
89If it reaches 0, it frees the
78.Vt DSA 90.Vt DSA
79structure and its components. 91structure and its components.
80The values are erased before the memory is returned to the system. 92The values are erased before the memory is returned to the system.
@@ -91,6 +103,9 @@ returns
91and sets an error code that can be obtained by 103and sets an error code that can be obtained by
92.Xr ERR_get_error 3 . 104.Xr ERR_get_error 3 .
93Otherwise it returns a pointer to the newly allocated structure. 105Otherwise it returns a pointer to the newly allocated structure.
106.Pp
107.Fn DSA_up_ref
108returns 1 for success or 0 for failure.
94.Sh SEE ALSO 109.Sh SEE ALSO
95.Xr BN_new 3 , 110.Xr BN_new 3 ,
96.Xr d2i_DSAPublicKey 3 , 111.Xr d2i_DSAPublicKey 3 ,
@@ -107,7 +122,6 @@ Otherwise it returns a pointer to the newly allocated structure.
107.Xr DSA_SIG_new 3 , 122.Xr DSA_SIG_new 3 ,
108.Xr DSA_sign 3 , 123.Xr DSA_sign 3 ,
109.Xr DSA_size 3 , 124.Xr DSA_size 3 ,
110.Xr engine 3 ,
111.Xr ERR_get_error 3 , 125.Xr ERR_get_error 3 ,
112.Xr EVP_PKEY_set1_DSA 3 , 126.Xr EVP_PKEY_set1_DSA 3 ,
113.Xr RSA_new 3 127.Xr RSA_new 3
@@ -120,3 +134,7 @@ and
120.Fn DSA_free 134.Fn DSA_free
121first appeared in SSLeay 0.6.0 and have been available since 135first appeared in SSLeay 0.6.0 and have been available since
122.Ox 2.4 . 136.Ox 2.4 .
137.Pp
138.Fn DSA_up_ref
139first appeared in OpenSSL 0.9.7 and has been available since
140.Ox 3.2 .
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
72allocates and initializes an 77allocates and initializes an
73.Vt RSA 78.Vt RSA
74structure. 79structure, setting the reference count to 1.
75It is equivalent to calling 80It is equivalent to calling
76.Fn RSA_new_method NULL . 81.Xr RSA_new_method 3
82with a
83.Dv NULL
84argument.
85.Pp
86.Fn RSA_up_ref
87increments the reference count by 1.
77.Pp 88.Pp
78.Fn RSA_free 89.Fn RSA_free
79frees the 90decrements the reference count by 1.
91If it reaches 0, it frees the
80.Vt RSA 92.Vt RSA
81structure and its components. 93structure and its components.
82The key is erased before the memory is returned to the system. 94The key is erased before the memory is returned to the system.
@@ -149,12 +161,14 @@ returns
149and sets an error code that can be obtained by 161and sets an error code that can be obtained by
150.Xr ERR_get_error 3 . 162.Xr ERR_get_error 3 .
151Otherwise it returns a pointer to the newly allocated structure. 163Otherwise it returns a pointer to the newly allocated structure.
164.Pp
165.Fn RSA_up_ref
166returns 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
182appeared in SSLeay 0.4 or earlier and have been available since 196appeared 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
200first appeared in OpenSSL 0.9.7 and has been available since
201.Ox 3.2 .