summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-02-19 10:40:00 +0000
committerschwarze <>2018-02-19 10:40:00 +0000
commit6efbb1d41a83eb7abe57f0fdcd8dc80b083edd8d (patch)
tree357c58d21029e957dee44bea68f7c21e50c0a8b1 /src
parentad40d74e260988f1e3315a9252a10f98dadc13f2 (diff)
downloadopenbsd-6efbb1d41a83eb7abe57f0fdcd8dc80b083edd8d.tar.gz
openbsd-6efbb1d41a83eb7abe57f0fdcd8dc80b083edd8d.tar.bz2
openbsd-6efbb1d41a83eb7abe57f0fdcd8dc80b083edd8d.zip
In dsa.h rev. 1.25 2018/02/18 12:50:58, tb@ provided DSA_set0_pqg(3)
and in dsa.h rev. 1.26 2018/02/18 14:58:12 DSA_set0_key(3). Merge the documentation from OpenSSL.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/DSA_get0_pqg.372
1 files changed, 68 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/DSA_get0_pqg.3 b/src/lib/libcrypto/man/DSA_get0_pqg.3
index f3dbe0ce8d..5b8ef9f52a 100644
--- a/src/lib/libcrypto/man/DSA_get0_pqg.3
+++ b/src/lib/libcrypto/man/DSA_get0_pqg.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DSA_get0_pqg.3,v 1.1 2018/02/17 16:59:48 schwarze Exp $ 1.\" $OpenBSD: DSA_get0_pqg.3,v 1.2 2018/02/19 10:40:00 schwarze Exp $
2.\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400 2.\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400
3.\" 3.\"
4.\" This file was written by Matt Caswell <matt@openssl.org>. 4.\" This file was written by Matt Caswell <matt@openssl.org>.
@@ -48,13 +48,15 @@
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: February 17 2018 $ 51.Dd $Mdocdate: February 19 2018 $
52.Dt DSA_GET0_PQG 3 52.Dt DSA_GET0_PQG 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
55.Nm DSA_get0_pqg , 55.Nm DSA_get0_pqg ,
56.Nm DSA_get0_key 56.Nm DSA_set0_pqg ,
57.Nd get data from a DSA object 57.Nm DSA_get0_key ,
58.Nm DSA_set0_key
59.Nd get data from and set data in a DSA object
58.Sh SYNOPSIS 60.Sh SYNOPSIS
59.In openssl/dsa.h 61.In openssl/dsa.h
60.Ft void 62.Ft void
@@ -64,12 +66,25 @@
64.Fa "const BIGNUM **q" 66.Fa "const BIGNUM **q"
65.Fa "const BIGNUM **g" 67.Fa "const BIGNUM **g"
66.Fc 68.Fc
69.Ft int
70.Fo DSA_set0_pqg
71.Fa "DSA *d"
72.Fa "BIGNUM *p"
73.Fa "BIGNUM *q"
74.Fa "BIGNUM *g"
75.Fc
67.Ft void 76.Ft void
68.Fo DSA_get0_key 77.Fo DSA_get0_key
69.Fa "const DSA *d" 78.Fa "const DSA *d"
70.Fa "const BIGNUM **pub_key" 79.Fa "const BIGNUM **pub_key"
71.Fa "const BIGNUM **priv_key" 80.Fa "const BIGNUM **priv_key"
72.Fc 81.Fc
82.Ft int
83.Fo DSA_set0_key
84.Fa "DSA *d"
85.Fa "BIGNUM *pub_key"
86.Fa "BIGNUM *priv_key"
87.Fc
73.Sh DESCRIPTION 88.Sh DESCRIPTION
74A 89A
75.Vt DSA 90.Vt DSA
@@ -101,6 +116,17 @@ Otherwise, they are set to pointers to the internal representations
101of the values that should not be freed by the application. 116of the values that should not be freed by the application.
102.Pp 117.Pp
103The 118The
119.Fa p ,
120.Fa q ,
121and
122.Fa g
123values can be set by calling
124.Fn DSA_set0_pqg .
125Calling this function transfers the memory management of the values to
126.Fa d ,
127and therefore they should not be freed by the caller.
128.Pp
129The
104.Fn DSA_get0_key 130.Fn DSA_get0_key
105function stores pointers to the internal representations 131function stores pointers to the internal representations
106of the public key in 132of the public key in
@@ -111,6 +137,44 @@ Either may be
111.Dv NULL 137.Dv NULL
112if it has not yet been set. 138if it has not yet been set.
113If the private key has been set, then the public key must be. 139If the private key has been set, then the public key must be.
140.Pp
141The public and private key values can be set using
142.Fn DSA_set0_key .
143The public key must be
144.Pf non- Dv NULL
145the first time this function is called on a given
146.Vt DSA
147object.
148The private key may be
149.Dv NULL .
150On subsequent calls, either may be
151.Dv NULL ,
152which means the corresponding
153.Vt DSA
154field is left untouched.
155.Fn DSA_set0_key
156transfers the memory management of the key values to
157.Fa d ,
158and therefore they should not be freed by the caller.
159.Pp
160Values retrieved with
161.Fn DSA_get0_pqg
162and
163.Fn DSA_get0_key
164are owned by the
165.Vt DSA
166object and may therefore not be passed to
167.Fn DSA_set0_pqg
168or
169.Fn DSA_set0_key .
170If needed, duplicate the received values using
171.Xr BN_dup 3
172and pass the duplicates.
173.Sh RETURN VALUES
174.Fn DSA_set0_pqg
175and
176.Fn DSA_set0_key
177return 1 on success or 0 on failure.
114.Sh SEE ALSO 178.Sh SEE ALSO
115.Xr DSA_do_sign 3 , 179.Xr DSA_do_sign 3 ,
116.Xr DSA_dup_DH 3 , 180.Xr DSA_dup_DH 3 ,