summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/DSA_set_method.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/DSA_set_method.pod')
-rw-r--r--src/lib/libcrypto/doc/DSA_set_method.pod63
1 files changed, 35 insertions, 28 deletions
diff --git a/src/lib/libcrypto/doc/DSA_set_method.pod b/src/lib/libcrypto/doc/DSA_set_method.pod
index 0b13ec9237..36a1052d27 100644
--- a/src/lib/libcrypto/doc/DSA_set_method.pod
+++ b/src/lib/libcrypto/doc/DSA_set_method.pod
@@ -2,20 +2,21 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5DSA_set_default_method, DSA_get_default_method, DSA_set_method, 5DSA_set_default_openssl_method, DSA_get_default_openssl_method,
6DSA_new_method, DSA_OpenSSL - select RSA method 6DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
7 7
8=head1 SYNOPSIS 8=head1 SYNOPSIS
9 9
10 #include <openssl/DSA.h> 10 #include <openssl/dsa.h>
11 #include <openssl/engine.h>
11 12
12 void DSA_set_default_method(DSA_METHOD *meth); 13 void DSA_set_default_openssl_method(DSA_METHOD *meth);
13 14
14 DSA_METHOD *DSA_get_default_method(void); 15 DSA_METHOD *DSA_get_default_openssl_method(void);
15 16
16 DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); 17 int DSA_set_method(DSA *dsa, ENGINE *engine);
17 18
18 DSA *DSA_new_method(DSA_METHOD *meth); 19 DSA *DSA_new_method(ENGINE *engine);
19 20
20 DSA_METHOD *DSA_OpenSSL(void); 21 DSA_METHOD *DSA_OpenSSL(void);
21 22
@@ -28,20 +29,21 @@ such as hardware accelerators may be used.
28Initially, the default is to use the OpenSSL internal implementation. 29Initially, the default is to use the OpenSSL internal implementation.
29DSA_OpenSSL() returns a pointer to that method. 30DSA_OpenSSL() returns a pointer to that method.
30 31
31DSA_set_default_method() makes B<meth> the default method for all B<DSA> 32DSA_set_default_openssl_method() makes B<meth> the default method for
32structures created later. 33all DSA structures created later. B<NB:> This is true only whilst the
34default engine for DSA operations remains as "openssl". ENGINEs
35provide an encapsulation for implementations of one or more algorithms at a
36time, and all the DSA functions mentioned here operate within the scope
37of the default "openssl" engine.
33 38
34DSA_get_default_method() returns a pointer to the current default 39DSA_get_default_openssl_method() returns a pointer to the current default
35method. 40method for the "openssl" engine.
36 41
37DSA_set_method() selects B<meth> for all operations using the structure B<DSA>. 42DSA_set_method() selects B<engine> for all operations using the structure B<dsa>.
38 43
39DSA_get_method() returns a pointer to the method currently selected 44DSA_new_method() allocates and initializes a DSA structure so that
40for B<DSA>. 45B<engine> will be used for the DSA operations. If B<engine> is NULL,
41 46the default engine for DSA operations is used.
42DSA_new_method() allocates and initializes a B<DSA> structure so that
43B<method> will be used for the DSA operations. If B<method> is B<NULL>,
44the default method is used.
45 47
46=head1 THE DSA_METHOD STRUCTURE 48=head1 THE DSA_METHOD STRUCTURE
47 49
@@ -62,12 +64,13 @@ struct
62 int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, 64 int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len,
63 DSA_SIG *sig, DSA *dsa); 65 DSA_SIG *sig, DSA *dsa);
64 66
65 /* compute rr = a1^p1 * a2^p2 mod m. May be NULL */ 67 /* compute rr = a1^p1 * a2^p2 mod m (May be NULL for some
68 implementations) */
66 int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, 69 int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
67 BIGNUM *a2, BIGNUM *p2, BIGNUM *m, 70 BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
68 BN_CTX *ctx, BN_MONT_CTX *in_mont); 71 BN_CTX *ctx, BN_MONT_CTX *in_mont);
69 72
70 /* compute r = a ^ p mod m. May be NULL */ 73 /* compute r = a ^ p mod m (May be NULL for some implementations) */
71 int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, 74 int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a,
72 const BIGNUM *p, const BIGNUM *m, 75 const BIGNUM *p, const BIGNUM *m,
73 BN_CTX *ctx, BN_MONT_CTX *m_ctx); 76 BN_CTX *ctx, BN_MONT_CTX *m_ctx);
@@ -86,18 +89,17 @@ struct
86 89
87=head1 RETURN VALUES 90=head1 RETURN VALUES
88 91
89DSA_OpenSSL(), DSA_get_default_method() and DSA_get_method() return 92DSA_OpenSSL() and DSA_get_default_openssl_method() return pointers to the
90pointers to the respective B<DSA_METHOD>s. 93respective B<DSA_METHOD>s.
91 94
92DSA_set_default_method() returns no value. 95DSA_set_default_openssl_method() returns no value.
93 96
94DSA_set_method() returns a pointer to the B<DSA_METHOD> previously 97DSA_set_method() returns non-zero if the ENGINE associated with B<dsa>
95associated with B<dsa>. 98was successfully changed to B<engine>.
96 99
97DSA_new_method() returns B<NULL> and sets an error code that can be 100DSA_new_method() returns NULL and sets an error code that can be
98obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation 101obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation
99fails. Otherwise it returns a pointer to the newly allocated 102fails. Otherwise it returns a pointer to the newly allocated structure.
100structure.
101 103
102=head1 SEE ALSO 104=head1 SEE ALSO
103 105
@@ -108,4 +110,9 @@ L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)>
108DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), 110DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(),
109DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. 111DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4.
110 112
113DSA_set_default_openssl_method() and DSA_get_default_openssl_method()
114replaced DSA_set_default_method() and DSA_get_default_method() respectively,
115and DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s
116rather than B<DSA_METHOD>s during development of OpenSSL 0.9.6.
117
111=cut 118=cut