summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DSA_new.3
diff options
context:
space:
mode:
authorschwarze <>2018-04-18 01:11:45 +0000
committerschwarze <>2018-04-18 01:11:45 +0000
commita4c05ae36d82b4519f2776b36a8f194f93de8968 (patch)
tree7b0061152e4002b12206265090ac4b5906038ae8 /src/lib/libcrypto/man/DSA_new.3
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).
Diffstat (limited to 'src/lib/libcrypto/man/DSA_new.3')
-rw-r--r--src/lib/libcrypto/man/DSA_new.330
1 files changed, 24 insertions, 6 deletions
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 .