summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DSA_set_method.3
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/lib/libcrypto/man/DSA_set_method.3
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/lib/libcrypto/man/DSA_set_method.3')
-rw-r--r--src/lib/libcrypto/man/DSA_set_method.396
1 files changed, 33 insertions, 63 deletions
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.