summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DH_get0_pqg.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/DH_get0_pqg.3')
-rw-r--r--src/lib/libcrypto/man/DH_get0_pqg.3121
1 files changed, 121 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/DH_get0_pqg.3 b/src/lib/libcrypto/man/DH_get0_pqg.3
new file mode 100644
index 0000000000..3d8087dcfc
--- /dev/null
+++ b/src/lib/libcrypto/man/DH_get0_pqg.3
@@ -0,0 +1,121 @@
1.\" $OpenBSD: DH_get0_pqg.3,v 1.1 2018/02/17 16:59:48 schwarze Exp $
2.\" selective merge up to: OpenSSL 7966101e Sep 18 11:58:24 2017 -0400
3.\"
4.\" This file was written by Matt Caswell <matt@openssl.org>.
5.\" Copyright (c) 2016 The OpenSSL Project. All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\"
11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer.
13.\"
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in
16.\" the documentation and/or other materials provided with the
17.\" distribution.
18.\"
19.\" 3. All advertising materials mentioning features or use of this
20.\" software must display the following acknowledgment:
21.\" "This product includes software developed by the OpenSSL Project
22.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23.\"
24.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25.\" endorse or promote products derived from this software without
26.\" prior written permission. For written permission, please contact
27.\" openssl-core@openssl.org.
28.\"
29.\" 5. Products derived from this software may not be called "OpenSSL"
30.\" nor may "OpenSSL" appear in their names without prior written
31.\" permission of the OpenSSL Project.
32.\"
33.\" 6. Redistributions of any form whatsoever must retain the following
34.\" acknowledgment:
35.\" "This product includes software developed by the OpenSSL Project
36.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37.\"
38.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
42.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\"
51.Dd $Mdocdate: February 17 2018 $
52.Dt DH_GET0_PQG 3
53.Os
54.Sh NAME
55.Nm DH_get0_pqg ,
56.Nm DH_get0_key
57.Nd get data from a DH object
58.Sh SYNOPSIS
59.In openssl/dh.h
60.Ft void
61.Fo DH_get0_pqg
62.Fa "const DH *dh"
63.Fa "const BIGNUM **p"
64.Fa "const BIGNUM **q"
65.Fa "const BIGNUM **g"
66.Fc
67.Ft void
68.Fo DH_get0_key
69.Fa "const DH *dh"
70.Fa "const BIGNUM **pub_key"
71.Fa "const BIGNUM **priv_key"
72.Fc
73.Sh DESCRIPTION
74A
75.Vt DH
76object contains the parameters
77.Fa p ,
78.Fa q ,
79and optionally
80.Fa g .
81It also contains a public key
82.Fa pub_key
83and an optional private key
84.Fa priv_key .
85.Pp
86The
87.Fa p ,
88.Fa q ,
89and
90.Fa g
91parameters can be obtained by calling
92.Fn DH_get0_pqg .
93If the parameters have not yet been set, then
94.Pf * Fa p ,
95.Pf * Fa q ,
96and
97.Pf * Fa g
98are set to
99.Dv NULL .
100Otherwise, they are set to pointers to the internal representations
101of the values that should not be freed by the application.
102.Pp
103The
104.Fn DH_get0_key
105function stores pointers to the internal representations
106of the public key in
107.Pf * Fa pub_key
108and to the private key in
109.Pf * Fa priv_key .
110Either may be
111.Dv NULL
112if it has not yet been set.
113If the private key has been set, then the public key must be.
114.Sh SEE ALSO
115.Xr DH_generate_key 3 ,
116.Xr DH_generate_parameters 3 ,
117.Xr DH_new 3 ,
118.Xr DH_size 3 ,
119.Xr DHparams_print 3
120.Sh HISTORY
121These functions first appeared in OpenSSL 1.1.0.