diff options
Diffstat (limited to 'secure/lib/libcrypto/man/DSA_set_method.3')
-rw-r--r-- | secure/lib/libcrypto/man/DSA_set_method.3 | 94 |
1 files changed, 19 insertions, 75 deletions
diff --git a/secure/lib/libcrypto/man/DSA_set_method.3 b/secure/lib/libcrypto/man/DSA_set_method.3 index a734e6d44c181..f6cbc9a02be87 100644 --- a/secure/lib/libcrypto/man/DSA_set_method.3 +++ b/secure/lib/libcrypto/man/DSA_set_method.3 @@ -128,20 +128,18 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2018-08-14" "1.0.2p" "OpenSSL" +.IX Title "DSA_SET_METHOD 3" +.TH DSA_SET_METHOD 3 "2018-09-11" "1.1.1" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" -DSA_set_default_method, DSA_get_default_method, -DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method +DSA_set_default_method, DSA_get_default_method, DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method .SH "SYNOPSIS" .IX Header "SYNOPSIS" -.Vb 2 +.Vb 1 \& #include <openssl/dsa.h> -\& #include <openssl/engine.h> \& \& void DSA_set_default_method(const DSA_METHOD *meth); \& @@ -165,12 +163,15 @@ Initially, the default \s-1DSA_METHOD\s0 is the OpenSSL internal implementation, as returned by \fIDSA_OpenSSL()\fR. .PP \&\fIDSA_set_default_method()\fR makes \fBmeth\fR the default method for all \s-1DSA\s0 -structures created later. \fB\s-1NB\s0\fR: This is true only whilst no \s-1ENGINE\s0 has +structures created later. +\&\fB\s-1NB\s0\fR: This is true only whilst no \s-1ENGINE\s0 has been set as a default for \s-1DSA,\s0 so this function is no longer recommended. +This function is not thread-safe and should not be called at the same time +as other OpenSSL functions. .PP \&\fIDSA_get_default_method()\fR returns a pointer to the current default \&\s-1DSA_METHOD.\s0 However, the meaningfulness of this result is dependent on -whether the \s-1ENGINE API\s0 is being used, so this function is no longer +whether the \s-1ENGINE API\s0 is being used, so this function is no longer recommended. .PP \&\fIDSA_set_method()\fR selects \fBmeth\fR to perform all operations using the key @@ -180,55 +181,13 @@ be released during the change. It is possible to have \s-1DSA\s0 keys that only work with certain \s-1DSA_METHOD\s0 implementations (eg. from an \s-1ENGINE\s0 module that supports embedded hardware-protected keys), and in such cases attempting to change the \s-1DSA_METHOD\s0 for the key can have unexpected -results. +results. See DSA_meth_new for information on constructing custom \s-1DSA_METHOD\s0 +objects; .PP \&\fIDSA_new_method()\fR allocates and initializes a \s-1DSA\s0 structure so that \fBengine\fR will be used for the \s-1DSA\s0 operations. If \fBengine\fR is \s-1NULL,\s0 the default engine for \s-1DSA\s0 operations is used, and if no default \s-1ENGINE\s0 is set, the \s-1DSA_METHOD\s0 controlled by \fIDSA_set_default_method()\fR is used. -.SH "THE DSA_METHOD STRUCTURE" -.IX Header "THE DSA_METHOD STRUCTURE" -struct - { - /* name of the implementation */ - const char *name; -.PP -.Vb 3 -\& /* sign */ -\& DSA_SIG *(*dsa_do_sign)(const unsigned char *dgst, int dlen, -\& DSA *dsa); -\& -\& /* pre\-compute k^\-1 and r */ -\& int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, -\& BIGNUM **rp); -\& -\& /* verify */ -\& int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, -\& DSA_SIG *sig, DSA *dsa); -\& -\& /* compute rr = a1^p1 * a2^p2 mod m (May be NULL for some -\& implementations) */ -\& int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, -\& BIGNUM *a2, BIGNUM *p2, BIGNUM *m, -\& BN_CTX *ctx, BN_MONT_CTX *in_mont); -\& -\& /* compute r = a ^ p mod m (May be NULL for some implementations) */ -\& int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, -\& const BIGNUM *p, const BIGNUM *m, -\& BN_CTX *ctx, BN_MONT_CTX *m_ctx); -\& -\& /* called at DSA_new */ -\& int (*init)(DSA *DSA); -\& -\& /* called at DSA_free */ -\& int (*finish)(DSA *DSA); -\& -\& int flags; -\& -\& char *app_data; /* ?? */ -\& -\& } DSA_METHOD; -.Ve .SH "RETURN VALUES" .IX Header "RETURN VALUES" \&\fIDSA_OpenSSL()\fR and \fIDSA_get_default_method()\fR return pointers to the respective @@ -243,29 +202,14 @@ method was supplied by an \s-1ENGINE\s0). \&\fIDSA_new_method()\fR returns \s-1NULL\s0 and sets an error code that can be obtained by \fIERR_get_error\fR\|(3) if the allocation fails. Otherwise it returns a pointer to the newly allocated structure. -.SH "NOTES" -.IX Header "NOTES" -As of version 0.9.7, \s-1DSA_METHOD\s0 implementations are grouped together with other -algorithmic APIs (eg. \s-1RSA_METHOD, EVP_CIPHER,\s0 etc) in \fB\s-1ENGINE\s0\fR modules. If a -default \s-1ENGINE\s0 is specified for \s-1DSA\s0 functionality using an \s-1ENGINE API\s0 function, -that will override any \s-1DSA\s0 defaults set using the \s-1DSA API\s0 (ie. -\&\fIDSA_set_default_method()\fR). For this reason, the \s-1ENGINE API\s0 is the recommended way -to control default implementations for use in \s-1DSA\s0 and other cryptographic -algorithms. .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIdsa\fR\|(3), \fIDSA_new\fR\|(3) -.SH "HISTORY" -.IX Header "HISTORY" -\&\fIDSA_set_default_method()\fR, \fIDSA_get_default_method()\fR, \fIDSA_set_method()\fR, -\&\fIDSA_new_method()\fR and \fIDSA_OpenSSL()\fR were added in OpenSSL 0.9.4. +\&\fIDSA_new\fR\|(3), \fIDSA_new\fR\|(3), \fIDSA_meth_new\fR\|(3) +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved. .PP -\&\fIDSA_set_default_openssl_method()\fR and \fIDSA_get_default_openssl_method()\fR replaced -\&\fIDSA_set_default_method()\fR and \fIDSA_get_default_method()\fR respectively, and -\&\fIDSA_set_method()\fR and \fIDSA_new_method()\fR were altered to use \fB\s-1ENGINE\s0\fRs rather than -\&\fB\s-1DSA_METHOD\s0\fRs during development of the engine version of OpenSSL 0.9.6. For -0.9.7, the handling of defaults in the \s-1ENGINE API\s0 was restructured so that this -change was reversed, and behaviour of the other functions resembled more closely -the previous behaviour. The behaviour of defaults in the \s-1ENGINE API\s0 now -transparently overrides the behaviour of defaults in the \s-1DSA API\s0 without -requiring changing these function prototypes. +Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file \s-1LICENSE\s0 in the source distribution or at +<https://www.openssl.org/source/license.html>. |