diff options
author | schwarze <> | 2018-02-23 14:50:21 +0000 |
---|---|---|
committer | schwarze <> | 2018-02-23 14:50:21 +0000 |
commit | 4767a3b0c03bdf9e17dde9d7b4c4d61eebccecc9 (patch) | |
tree | 711adbd24650691a5b9e47fcf4534086b54397bb /src | |
parent | c3f3e0fd706592d658c6997fb545ad243eb69958 (diff) | |
download | openbsd-4767a3b0c03bdf9e17dde9d7b4c4d61eebccecc9.tar.gz openbsd-4767a3b0c03bdf9e17dde9d7b4c4d61eebccecc9.tar.bz2 openbsd-4767a3b0c03bdf9e17dde9d7b4c4d61eebccecc9.zip |
In dh.h rev. 1.22 2018/02/20 17:38:15, tb@ provided
DH_clear_flags(3), DH_test_flags(3), and DH_set_flags(3),
in rev. 1.24 2018/02/20 18:01:42 DH_set_length(3), and
in rev. 1.25 2018/02/22 16:41:04, jsing@ provided DH_get0_engine(3).
Merge the documentation from OpenSSL, tweaked by me.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/DH_get0_pqg.3 | 89 |
1 files changed, 82 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/DH_get0_pqg.3 b/src/lib/libcrypto/man/DH_get0_pqg.3 index 7fcad59fbb..5fa2eeb44f 100644 --- a/src/lib/libcrypto/man/DH_get0_pqg.3 +++ b/src/lib/libcrypto/man/DH_get0_pqg.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: DH_get0_pqg.3,v 1.2 2018/02/19 11:55:49 schwarze Exp $ | 1 | .\" $OpenBSD: DH_get0_pqg.3,v 1.3 2018/02/23 14:50:21 schwarze Exp $ |
2 | .\" selective merge up to: OpenSSL 7966101e Sep 18 11:58:24 2017 -0400 | 2 | .\" selective merge up to: OpenSSL 7966101e Sep 18 11:58:24 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,14 +48,19 @@ | |||
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 19 2018 $ | 51 | .Dd $Mdocdate: February 23 2018 $ |
52 | .Dt DH_GET0_PQG 3 | 52 | .Dt DH_GET0_PQG 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
55 | .Nm DH_get0_pqg , | 55 | .Nm DH_get0_pqg , |
56 | .Nm DH_set0_pqg , | 56 | .Nm DH_set0_pqg , |
57 | .Nm DH_get0_key , | 57 | .Nm DH_get0_key , |
58 | .Nm DH_set0_key | 58 | .Nm DH_set0_key , |
59 | .Nm DH_clear_flags , | ||
60 | .Nm DH_test_flags , | ||
61 | .Nm DH_set_flags , | ||
62 | .Nm DH_get0_engine , | ||
63 | .Nm DH_set_length | ||
59 | .Nd get data from and set data in a DH object | 64 | .Nd get data from and set data in a DH object |
60 | .Sh SYNOPSIS | 65 | .Sh SYNOPSIS |
61 | .In openssl/dh.h | 66 | .In openssl/dh.h |
@@ -85,14 +90,38 @@ | |||
85 | .Fa "BIGNUM *pub_key" | 90 | .Fa "BIGNUM *pub_key" |
86 | .Fa "BIGNUM *priv_key" | 91 | .Fa "BIGNUM *priv_key" |
87 | .Fc | 92 | .Fc |
93 | .Ft void | ||
94 | .Fo DH_clear_flags | ||
95 | .Fa "DH *dh" | ||
96 | .Fa "int flags" | ||
97 | .Fc | ||
98 | .Ft int | ||
99 | .Fo DH_test_flags | ||
100 | .Fa "const DH *dh" | ||
101 | .Fa "int flags" | ||
102 | .Fc | ||
103 | .Ft void | ||
104 | .Fo DH_set_flags | ||
105 | .Fa "DH *dh" | ||
106 | .Fa "int flags" | ||
107 | .Fc | ||
108 | .Ft ENGINE * | ||
109 | .Fo DH_get0_engine | ||
110 | .Fa "DH *d" | ||
111 | .Fc | ||
112 | .Ft int | ||
113 | .Fo DH_set_length | ||
114 | .Fa "DH *dh" | ||
115 | .Fa "long length" | ||
116 | .Fc | ||
88 | .Sh DESCRIPTION | 117 | .Sh DESCRIPTION |
89 | A | 118 | A |
90 | .Vt DH | 119 | .Vt DH |
91 | object contains the parameters | 120 | object contains the parameters |
92 | .Fa p , | 121 | .Fa p , |
93 | .Fa q , | 122 | .Fa g , |
94 | and optionally | 123 | and optionally |
95 | .Fa g . | 124 | .Fa q . |
96 | It also contains a public key | 125 | It also contains a public key |
97 | .Fa pub_key | 126 | .Fa pub_key |
98 | and an optional private key | 127 | and an optional private key |
@@ -166,11 +195,57 @@ or | |||
166 | If needed, duplicate the received values using | 195 | If needed, duplicate the received values using |
167 | .Xr BN_dup 3 | 196 | .Xr BN_dup 3 |
168 | and pass the duplicates. | 197 | and pass the duplicates. |
198 | .Pp | ||
199 | .Fn DH_clear_flags | ||
200 | clears the specified | ||
201 | .Fa flags | ||
202 | in | ||
203 | .Fa dh . | ||
204 | .Fn DH_test_flags | ||
205 | tests the | ||
206 | .Fa flags | ||
207 | in | ||
208 | .Fa dh . | ||
209 | .Fn DH_set_flags | ||
210 | sets the | ||
211 | .Fa flags | ||
212 | in | ||
213 | .Fa dh ; | ||
214 | any flags already set remain set. | ||
215 | For all three functions, multiple flags can be passed in one call, | ||
216 | OR'ed together bitwise. | ||
217 | .Pp | ||
218 | .Fn DH_set_length | ||
219 | sets the optional length attribute of | ||
220 | .Fa dh , | ||
221 | indicating the length of the secret exponent (private key) in bits. | ||
222 | If the length attribute is non-zero, it is used, otherwise it is ignored. | ||
169 | .Sh RETURN VALUES | 223 | .Sh RETURN VALUES |
170 | .Fn DH_set0_pqg | 224 | .Fn DH_set0_pqg , |
225 | .Fn DH_set0_key , | ||
171 | and | 226 | and |
172 | .Fn DH_set0_key | 227 | .Fn DH_set_length |
173 | return 1 on success or 0 on failure. | 228 | return 1 on success or 0 on failure. |
229 | .Pp | ||
230 | .Fn DH_test_flags | ||
231 | return those of the given | ||
232 | .Fa flags | ||
233 | currently set in | ||
234 | .Fa dh | ||
235 | or 0 if none of the given | ||
236 | .Fa flags | ||
237 | are set. | ||
238 | .Pp | ||
239 | .Fn DH_get0_engine | ||
240 | returns a pointer to the | ||
241 | .Vt ENGINE | ||
242 | used by the | ||
243 | .Vt DH | ||
244 | object | ||
245 | .Fa dh , | ||
246 | or | ||
247 | .Dv NULL | ||
248 | if no engine was set for this object. | ||
174 | .Sh SEE ALSO | 249 | .Sh SEE ALSO |
175 | .Xr DH_generate_key 3 , | 250 | .Xr DH_generate_key 3 , |
176 | .Xr DH_generate_parameters 3 , | 251 | .Xr DH_generate_parameters 3 , |