summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-04-18 01:09:01 +0000
committerschwarze <>2018-04-18 01:09:01 +0000
commitbf38af2d204a66db252db88697e129c75810d022 (patch)
tree2c4dc10a970df762b139b100fe0cb4b1255f91d6 /src
parent3853161947bef78ac2c0d8634299a75cea982c4c (diff)
downloadopenbsd-bf38af2d204a66db252db88697e129c75810d022.tar.gz
openbsd-bf38af2d204a66db252db88697e129c75810d022.tar.bz2
openbsd-bf38af2d204a66db252db88697e129c75810d022.zip
* Make the description of method selection simpler, more precise,
and more concise. * Correct the description of the return values of DH_set_method(3) and DSA_set_method(3). * Stop referencing engine(3).
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/DH_set_method.399
-rw-r--r--src/lib/libcrypto/man/DSA_set_method.396
2 files changed, 67 insertions, 128 deletions
diff --git a/src/lib/libcrypto/man/DH_set_method.3 b/src/lib/libcrypto/man/DH_set_method.3
index 77d1616445..9863cbaca9 100644
--- a/src/lib/libcrypto/man/DH_set_method.3
+++ b/src/lib/libcrypto/man/DH_set_method.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DH_set_method.3,v 1.6 2018/03/22 16:06:33 schwarze Exp $ 1.\" $OpenBSD: DH_set_method.3,v 1.7 2018/04/18 01:09:01 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,7 +48,7 @@
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 22 2018 $ 51.Dd $Mdocdate: April 18 2018 $
52.Dt DH_SET_METHOD 3 52.Dt DH_SET_METHOD 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -84,53 +84,44 @@
84.Sh DESCRIPTION 84.Sh DESCRIPTION
85A 85A
86.Vt DH_METHOD 86.Vt DH_METHOD
87specifies the functions that OpenSSL uses for Diffie-Hellman operations. 87object contains pointers to the functions
88By modifying the method, alternative implementations such as hardware 88used for Diffie-Hellman operations.
89accelerators may be used. 89By default, the internal implementation returned by
90See the 90.Fn DH_OpenSSL
91.Sx CAVEATS 91is used.
92section for how these DH API functions are affected by the use of 92By selecting another method, alternative implementations
93.Xr engine 3 93such as hardware accelerators may be used.
94API calls.
95.Pp
96Initially, the default
97.Vt DH_METHOD
98is the OpenSSL internal implementation as returned by
99.Fn DH_OpenSSL .
100.Pp 94.Pp
101.Fn DH_set_default_method 95.Fn DH_set_default_method
102makes 96selects
103.Fa meth 97.Fa meth
104the default method for all 98as the default method for all
105.Vt DH 99.Vt DH
106structures created later. 100structures created later.
107.Sy NB : 101If any
108This is true only whilst no
109.Vt ENGINE 102.Vt ENGINE
110has been set as a default for DH, so this function is no longer 103was registered with
111recommended. 104.Xr ENGINE_register_DH 3
105that can be successfully initialized, it overrides the default.
112.Pp 106.Pp
113.Fn DH_get_default_method 107.Fn DH_get_default_method
114returns a pointer to the current default 108returns a pointer to the current default method,
115.Vt DH_METHOD . 109even if it is actually overridded by an
116However, the meaningfulness of this result is dependent on whether the 110.Vt ENGINE .
117.Xr engine 3
118API is being used, so this function is no longer recommended.
119.Pp 111.Pp
120.Fn DH_set_method 112.Fn DH_set_method
121selects 113selects
122.Fa meth 114.Fa meth
123to perform all operations using the key 115to perform all operations using the key
124.Fa dh . 116.Fa dh .
125This will replace the 117This replaces the
126.Vt DH_METHOD 118.Vt DH_METHOD
127used by the 119used by the
128.Fa dh 120.Fa dh
129key and if the previous method was supplied by an 121key and if the previous method was supplied by an
130.Vt ENGINE , 122.Vt ENGINE ,
131the handle to that 123.Xr ENGINE_finish 3
132.Vt ENGINE 124is called on it.
133will be released during the change.
134It is possible to have 125It is possible to have
135.Vt DH 126.Vt DH
136keys that only work with certain 127keys that only work with certain
@@ -147,18 +138,16 @@ allocates and initializes a
147.Vt DH 138.Vt DH
148structure so that 139structure so that
149.Fa engine 140.Fa engine
150will be used for the DH operations. 141is used for the DH operations.
151If 142If
152.Fa engine 143.Fa engine
153is 144is
154.Dv NULL , 145.Dv NULL ,
155the default 146.Xr ENGINE_get_default_DH 3
156.Vt ENGINE 147is used.
157for DH operations is used and, if no default 148If that returns
158.Vt ENGINE 149.Dv NULL ,
159is set, the 150the default method controlled by
160.Vt DH_METHOD
161controlled by
162.Fn DH_set_default_method 151.Fn DH_set_default_method
163is used. 152is used.
164.Pp 153.Pp
@@ -199,17 +188,11 @@ typedef struct dh_meth_st
199and 188and
200.Fn DH_get_default_method 189.Fn DH_get_default_method
201return pointers to the respective 190return pointers to the respective
202.Sy DH_METHOD Ns s. 191.Vt DH_METHOD .
203.Pp 192.Pp
204.Fn DH_set_method 193.Fn DH_set_method
205returns non-zero if the provided 194returns 1 on success or 0 on failure.
206.Fa meth 195Currently, it cannot fail.
207was successfully set as the method for
208.Fa dh
209(including unloading the
210.Vt ENGINE
211handle if the previous method was supplied by an
212.Vt ENGINE ) .
213.Pp 196.Pp
214.Fn DH_new_method 197.Fn DH_new_method
215returns 198returns
@@ -219,7 +202,10 @@ and sets an error code that can be obtained by
219if the allocation fails. 202if the allocation fails.
220Otherwise it returns a pointer to the newly allocated structure. 203Otherwise it returns a pointer to the newly allocated structure.
221.Sh SEE ALSO 204.Sh SEE ALSO
222.Xr DH_new 3 205.Xr DH_new 3 ,
206.Xr ENGINE_get_default_DH 3 ,
207.Xr ENGINE_register_DH 3 ,
208.Xr ENGINE_set_default_DH 3
223.Sh HISTORY 209.Sh HISTORY
224.Fn DH_set_default_method , 210.Fn DH_set_default_method ,
225.Fn DH_get_default_method , 211.Fn DH_get_default_method ,
@@ -229,20 +215,3 @@ and
229.Fn DH_OpenSSL 215.Fn DH_OpenSSL
230first appeared in OpenSSL 0.9.5 and have been available since 216first appeared in OpenSSL 0.9.5 and have been available since
231.Ox 2.7 . 217.Ox 2.7 .
232.Sh CAVEATS
233As of version 0.9.7,
234.Vt DH_METHOD
235implementations are grouped together with other algorithmic APIs
236(e.g. RSA_METHOD, EVP_CIPHER) in
237.Vt ENGINE
238modules.
239If a default
240.Vt ENGINE
241is specified for DH functionality using an
242.Xr engine 3
243API function, that will override any DH defaults set using the DH API
244.Pq i.e. Fn DH_set_default_method .
245For this reason, the
246.Xr engine 3
247API is the recommended way to control default implementations
248for use in DH and other cryptographic algorithms.
diff --git a/src/lib/libcrypto/man/DSA_set_method.3 b/src/lib/libcrypto/man/DSA_set_method.3
index f54c392097..8221f856be 100644
--- a/src/lib/libcrypto/man/DSA_set_method.3
+++ b/src/lib/libcrypto/man/DSA_set_method.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DSA_set_method.3,v 1.8 2018/03/22 16:06:33 schwarze Exp $ 1.\" $OpenBSD: DSA_set_method.3,v 1.9 2018/04/18 01:09:01 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,7 +48,7 @@
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 22 2018 $ 51.Dd $Mdocdate: April 18 2018 $
52.Dt DSA_SET_METHOD 3 52.Dt DSA_SET_METHOD 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -60,7 +60,6 @@
60.Nd select DSA method 60.Nd select DSA method
61.Sh SYNOPSIS 61.Sh SYNOPSIS
62.In openssl/dsa.h 62.In openssl/dsa.h
63.In openssl/engine.h
64.Ft void 63.Ft void
65.Fo DSA_set_default_method 64.Fo DSA_set_default_method
66.Fa "const DSA_METHOD *meth" 65.Fa "const DSA_METHOD *meth"
@@ -81,51 +80,41 @@
81.Sh DESCRIPTION 80.Sh DESCRIPTION
82A 81A
83.Vt DSA_METHOD 82.Vt DSA_METHOD
84specifies the functions that OpenSSL uses for DSA operations. 83object contains pointers to the functions used for DSA operations.
85By modifying the method, alternative implementations such as hardware 84By default, the internal implementation returned by
86accelerators may be used. 85.Fn DSA_OpenSSL
87See the 86is used.
88.Sx CAVEATS 87By selecting another method, alternative implementations
89section for how these DSA API functions are affected by the use of 88such as hardware accelerators may be used.
90.Xr engine 3
91API calls.
92.Pp
93Initially, the default
94.Vt DSA_METHOD
95is the OpenSSL internal implementation, as returned by
96.Fn DSA_OpenSSL .
97.Pp 89.Pp
98.Fn DSA_set_default_method 90.Fn DSA_set_default_method
99makes 91selects
100.Fa meth 92.Fa meth
101the default method for all 93as the default method for all
102.Vt DSA 94.Vt DSA
103structures created later. 95structures created later.
104.Sy Note : 96If any
105this is true only whilst no
106.Vt ENGINE 97.Vt ENGINE
107has been set as a default for DSA, so this function is no longer 98was registered with
108recommended. 99.Xr ENGINE_register_DSA 3
100that can be successfully initialized, it overrides the default.
109.Pp 101.Pp
110.Fn DSA_get_default_method 102.Fn DSA_get_default_method
111returns a pointer to the current default 103returns a pointer to the current default method,
112.Vt DSA_METHOD . 104even if it is actually overridded by an
113However, the meaningfulness of this result is dependent on whether the 105.Vt ENGINE .
114.Xr engine 3
115API is being used, so this function is no longer recommended.
116.Pp 106.Pp
117.Fn DSA_set_method 107.Fn DSA_set_method
118selects 108selects
119.Fa meth 109.Fa meth
120to perform all operations using the key 110to perform all operations using the key
121.Fa dsa . 111.Fa dsa .
122This will replace the 112This replaces the
123.Vt DSA_METHOD 113.Vt DSA_METHOD
124used by the DSA key and if the previous method was supplied by an 114used by the DSA key and if the previous method was supplied by an
125.Vt ENGINE , 115.Vt ENGINE ,
126the handle to that 116.Xr ENGINE_finish 3
127.Vt ENGINE 117is called on it.
128will be released during the change.
129It is possible to have DSA keys that only work with certain 118It is possible to have DSA keys that only work with certain
130.Vt DSA_METHOD 119.Vt DSA_METHOD
131implementations (e.g. from an 120implementations (e.g. from an
@@ -140,17 +129,16 @@ allocates and initializes a
140.Vt DSA 129.Vt DSA
141structure so that 130structure so that
142.Fa engine 131.Fa engine
143will be used for the DSA operations. 132is used for the DSA operations.
144If 133If
145.Fa engine 134.Fa engine
146is 135is
147.Dv NULL , 136.Dv NULL ,
148the default engine for DSA operations is used and, if no 137.Xr ENGINE_get_default_DSA 3
149default 138is used.
150.Vt ENGINE 139If that returns
151is set, the 140.Dv NULL ,
152.Vt DSA_METHOD 141the default method controlled by
153controlled by
154.Fn DSA_set_default_method 142.Fn DSA_set_default_method
155is used. 143is used.
156.Pp 144.Pp
@@ -203,17 +191,11 @@ struct
203and 191and
204.Fn DSA_get_default_method 192.Fn DSA_get_default_method
205return pointers to the respective 193return pointers to the respective
206.Vt DSA_METHOD Ns s . 194.Vt DSA_METHOD .
207.Pp 195.Pp
208.Fn DSA_set_method 196.Fn DSA_set_method
209returns non-zero if the provided 197returns 1 on success or 0 on failure.
210.Fa meth 198Currently, it cannot fail.
211was successfully set as the method for
212.Fa dsa
213(including unloading the
214.Vt ENGINE
215handle if the previous method was supplied by an
216.Vt ENGINE ) .
217.Pp 199.Pp
218.Fn DSA_new_method 200.Fn DSA_new_method
219returns 201returns
@@ -224,7 +206,10 @@ if the allocation fails.
224Otherwise it returns a pointer to the newly allocated structure. 206Otherwise it returns a pointer to the newly allocated structure.
225.Sh SEE ALSO 207.Sh SEE ALSO
226.Xr DSA_meth_new 3 , 208.Xr DSA_meth_new 3 ,
227.Xr DSA_new 3 209.Xr DSA_new 3 ,
210.Xr ENGINE_get_default_DSA 3 ,
211.Xr ENGINE_register_DSA 3 ,
212.Xr ENGINE_set_default_DSA 3
228.Sh HISTORY 213.Sh HISTORY
229.Fn DSA_set_default_method , 214.Fn DSA_set_default_method ,
230.Fn DSA_get_default_method , 215.Fn DSA_get_default_method ,
@@ -234,18 +219,3 @@ and
234.Fn DSA_OpenSSL 219.Fn DSA_OpenSSL
235first appeared in OpenSSL 0.9.5 and have been available since 220first appeared in OpenSSL 0.9.5 and have been available since
236.Ox 2.7 . 221.Ox 2.7 .
237.Sh CAVEATS
238As of version 0.9.7, DSA_METHOD implementations are grouped together
239with other algorithmic APIs (e.g. RSA_METHOD, EVP_CIPHER) in
240.Vt ENGINE
241modules.
242If a default
243.Vt ENGINE
244is specified for DSA functionality using an
245.Xr engine 3
246API function, that will override any DSA defaults set using the DSA API
247.Pq i.e. DSA_set_default_method .
248For this reason, the
249.Xr engine 3
250API is the recommended way to control default implementations for
251use in DSA and other cryptographic algorithms.