DSA_set_method.3 (100947) | DSA_set_method.3 (110010) |
---|---|
1.\" Automatically generated by Pod::Man version 1.15 | 1.\" Automatically generated by Pod::Man version 1.15 |
2.\" Tue Jul 30 09:21:33 2002 | 2.\" Mon Jan 13 19:27:47 2003 |
3.\" 4.\" Standard preamble: 5.\" ====================================================================== 6.de Sh \" Subsection heading 7.br 8.if t .Sp 9.ne 5 10.PP --- 122 unchanged lines hidden (view full) --- 133. ds Th \o'LP' 134. ds ae ae 135. ds Ae AE 136.\} 137.rm #[ #] #H #V #F C 138.\" ====================================================================== 139.\" 140.IX Title "DSA_set_method 3" | 3.\" 4.\" Standard preamble: 5.\" ====================================================================== 6.de Sh \" Subsection heading 7.br 8.if t .Sp 9.ne 5 10.PP --- 122 unchanged lines hidden (view full) --- 133. ds Th \o'LP' 134. ds ae ae 135. ds Ae AE 136.\} 137.rm #[ #] #H #V #F C 138.\" ====================================================================== 139.\" 140.IX Title "DSA_set_method 3" |
141.TH DSA_set_method 3 "0.9.6e" "2000-11-12" "OpenSSL" | 141.TH DSA_set_method 3 "0.9.7" "2003-01-13" "OpenSSL" |
142.UC 143.SH "NAME" | 142.UC 143.SH "NAME" |
144DSA_set_default_method, DSA_get_default_method, DSA_set_method, 145DSA_new_method, DSA_OpenSSL \- select \s-1DSA\s0 method | 144DSA_set_default_method, DSA_get_default_method, 145DSA_set_method, DSA_new_method, DSA_OpenSSL \- select \s-1DSA\s0 method |
146.SH "SYNOPSIS" 147.IX Header "SYNOPSIS" | 146.SH "SYNOPSIS" 147.IX Header "SYNOPSIS" |
148.Vb 1 | 148.Vb 2 |
149\& #include <openssl/dsa.h> | 149\& #include <openssl/dsa.h> |
150\& #include <openssl/engine.h> |
|
150.Ve 151.Vb 1 | 151.Ve 152.Vb 1 |
152\& void DSA_set_default_method(DSA_METHOD *meth); | 153\& void DSA_set_default_method(const DSA_METHOD *meth); |
153.Ve 154.Vb 1 | 154.Ve 155.Vb 1 |
155\& DSA_METHOD *DSA_get_default_method(void); | 156\& const DSA_METHOD *DSA_get_default_method(void); |
156.Ve 157.Vb 1 | 157.Ve 158.Vb 1 |
158\& DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); | 159\& int DSA_set_method(DSA *dsa, const DSA_METHOD *meth); |
159.Ve 160.Vb 1 | 160.Ve 161.Vb 1 |
161\& DSA *DSA_new_method(DSA_METHOD *meth); | 162\& DSA *DSA_new_method(ENGINE *engine); |
162.Ve 163.Vb 1 164\& DSA_METHOD *DSA_OpenSSL(void); 165.Ve 166.SH "DESCRIPTION" 167.IX Header "DESCRIPTION" 168A \fB\s-1DSA_METHOD\s0\fR specifies the functions that OpenSSL uses for \s-1DSA\s0 169operations. By modifying the method, alternative implementations | 163.Ve 164.Vb 1 165\& DSA_METHOD *DSA_OpenSSL(void); 166.Ve 167.SH "DESCRIPTION" 168.IX Header "DESCRIPTION" 169A \fB\s-1DSA_METHOD\s0\fR specifies the functions that OpenSSL uses for \s-1DSA\s0 170operations. By modifying the method, alternative implementations |
170such as hardware accelerators may be used. | 171such as hardware accelerators may be used. \s-1IMPORTANT:\s0 See the \s-1NOTES\s0 section for 172important information about how these \s-1DSA\s0 \s-1API\s0 functions are affected by the use 173of \fB\s-1ENGINE\s0\fR \s-1API\s0 calls. |
171.PP | 174.PP |
172Initially, the default is to use the OpenSSL internal implementation. 173\&\fIDSA_OpenSSL()\fR returns a pointer to that method. | 175Initially, the default \s-1DSA_METHOD\s0 is the OpenSSL internal implementation, 176as returned by \fIDSA_OpenSSL()\fR. |
174.PP | 177.PP |
175\&\fIDSA_set_default_method()\fR makes \fBmeth\fR the default method for all \fB\s-1DSA\s0\fR 176structures created later. | 178\&\fIDSA_set_default_method()\fR makes \fBmeth\fR the default method for all \s-1DSA\s0 179structures created later. \fB\s-1NB\s0\fR: This is true only whilst no \s-1ENGINE\s0 has 180been set as a default for \s-1DSA\s0, so this function is no longer recommended. |
177.PP 178\&\fIDSA_get_default_method()\fR returns a pointer to the current default | 181.PP 182\&\fIDSA_get_default_method()\fR returns a pointer to the current default |
179method. | 183\&\s-1DSA_METHOD\s0. However, the meaningfulness of this result is dependant on 184whether the \s-1ENGINE\s0 \s-1API\s0 is being used, so this function is no longer 185recommended. |
180.PP | 186.PP |
181\&\fIDSA_set_method()\fR selects \fBmeth\fR for all operations using the structure \fBdsa\fR. | 187\&\fIDSA_set_method()\fR selects \fBmeth\fR to perform all operations using the key 188\&\fBrsa\fR. This will replace the \s-1DSA_METHOD\s0 used by the \s-1DSA\s0 key and if the 189previous method was supplied by an \s-1ENGINE\s0, the handle to that \s-1ENGINE\s0 will 190be released during the change. It is possible to have \s-1DSA\s0 keys that only 191work with certain \s-1DSA_METHOD\s0 implementations (eg. from an \s-1ENGINE\s0 module 192that supports embedded hardware-protected keys), and in such cases 193attempting to change the \s-1DSA_METHOD\s0 for the key can have unexpected 194results. |
182.PP | 195.PP |
183\&\fIDSA_new_method()\fR allocates and initializes a \fB\s-1DSA\s0\fR structure so that 184\&\fBmethod\fR will be used for the \s-1DSA\s0 operations. If \fBmethod\fR is \fB\s-1NULL\s0\fR, 185the default method is used. | 196\&\fIDSA_new_method()\fR allocates and initializes a \s-1DSA\s0 structure so that \fBengine\fR 197will be used for the \s-1DSA\s0 operations. If \fBengine\fR is \s-1NULL\s0, the default engine 198for \s-1DSA\s0 operations is used, and if no default \s-1ENGINE\s0 is set, the \s-1DSA_METHOD\s0 199controlled by \fIDSA_set_default_method()\fR is used. |
186.SH "THE DSA_METHOD STRUCTURE" 187.IX Header "THE DSA_METHOD STRUCTURE" 188struct 189 { 190 /* name of the implementation */ 191 const char *name; 192.PP 193.Vb 3 --- 38 unchanged lines hidden (view full) --- 232.Vb 1 233\& char *app_data; /* ?? */ 234.Ve 235.Vb 1 236\& } DSA_METHOD; 237.Ve 238.SH "RETURN VALUES" 239.IX Header "RETURN VALUES" | 200.SH "THE DSA_METHOD STRUCTURE" 201.IX Header "THE DSA_METHOD STRUCTURE" 202struct 203 { 204 /* name of the implementation */ 205 const char *name; 206.PP 207.Vb 3 --- 38 unchanged lines hidden (view full) --- 246.Vb 1 247\& char *app_data; /* ?? */ 248.Ve 249.Vb 1 250\& } DSA_METHOD; 251.Ve 252.SH "RETURN VALUES" 253.IX Header "RETURN VALUES" |
240\&\fIDSA_OpenSSL()\fR and \fIDSA_get_default_method()\fR return pointers to the 241respective \fB\s-1DSA_METHOD\s0\fRs. | 254\&\fIDSA_OpenSSL()\fR and \fIDSA_get_default_method()\fR return pointers to the respective 255\&\fB\s-1DSA_METHOD\s0\fRs. |
242.PP 243\&\fIDSA_set_default_method()\fR returns no value. 244.PP | 256.PP 257\&\fIDSA_set_default_method()\fR returns no value. 258.PP |
245\&\fIDSA_set_method()\fR returns a pointer to the \fB\s-1DSA_METHOD\s0\fR previously 246associated with \fBdsa\fR. | 259\&\fIDSA_set_method()\fR returns non-zero if the provided \fBmeth\fR was successfully set as 260the method for \fBdsa\fR (including unloading the \s-1ENGINE\s0 handle if the previous 261method was supplied by an \s-1ENGINE\s0). |
247.PP | 262.PP |
248\&\fIDSA_new_method()\fR returns \fB\s-1NULL\s0\fR and sets an error code that can be | 263\&\fIDSA_new_method()\fR returns \s-1NULL\s0 and sets an error code that can be |
249obtained by ERR_get_error(3) if the allocation | 264obtained by ERR_get_error(3) if the allocation |
250fails. Otherwise it returns a pointer to the newly allocated 251structure. | 265fails. Otherwise it returns a pointer to the newly allocated structure. 266.SH "NOTES" 267.IX Header "NOTES" 268As of version 0.9.7, \s-1DSA_METHOD\s0 implementations are grouped together with other 269algorithmic APIs (eg. \s-1RSA_METHOD\s0, \s-1EVP_CIPHER\s0, etc) in \fB\s-1ENGINE\s0\fR modules. If a 270default \s-1ENGINE\s0 is specified for \s-1DSA\s0 functionality using an \s-1ENGINE\s0 \s-1API\s0 function, 271that will override any \s-1DSA\s0 defaults set using the \s-1DSA\s0 \s-1API\s0 (ie. 272\&\fIDSA_set_default_method()\fR). For this reason, the \s-1ENGINE\s0 \s-1API\s0 is the recommended way 273to control default implementations for use in \s-1DSA\s0 and other cryptographic 274algorithms. |
252.SH "SEE ALSO" 253.IX Header "SEE ALSO" 254dsa(3), DSA_new(3) 255.SH "HISTORY" 256.IX Header "HISTORY" 257\&\fIDSA_set_default_method()\fR, \fIDSA_get_default_method()\fR, \fIDSA_set_method()\fR, 258\&\fIDSA_new_method()\fR and \fIDSA_OpenSSL()\fR were added in OpenSSL 0.9.4. | 275.SH "SEE ALSO" 276.IX Header "SEE ALSO" 277dsa(3), DSA_new(3) 278.SH "HISTORY" 279.IX Header "HISTORY" 280\&\fIDSA_set_default_method()\fR, \fIDSA_get_default_method()\fR, \fIDSA_set_method()\fR, 281\&\fIDSA_new_method()\fR and \fIDSA_OpenSSL()\fR were added in OpenSSL 0.9.4. |
282.PP 283\&\fIDSA_set_default_openssl_method()\fR and \fIDSA_get_default_openssl_method()\fR replaced 284\&\fIDSA_set_default_method()\fR and \fIDSA_get_default_method()\fR respectively, and 285\&\fIDSA_set_method()\fR and \fIDSA_new_method()\fR were altered to use \fB\s-1ENGINE\s0\fRs rather than 286\&\fB\s-1DSA_METHOD\s0\fRs during development of the engine version of OpenSSL 0.9.6. For 2870.9.7, the handling of defaults in the \s-1ENGINE\s0 \s-1API\s0 was restructured so that this 288change was reversed, and behaviour of the other functions resembled more closely 289the previous behaviour. The behaviour of defaults in the \s-1ENGINE\s0 \s-1API\s0 now 290transparently overrides the behaviour of defaults in the \s-1DSA\s0 \s-1API\s0 without 291requiring changing these function prototypes. |
|