diff options
author | markus <> | 2002-09-05 12:51:50 +0000 |
---|---|---|
committer | markus <> | 2002-09-05 12:51:50 +0000 |
commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/doc/DSA_set_method.pod | |
parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/doc/DSA_set_method.pod')
-rw-r--r-- | src/lib/libcrypto/doc/DSA_set_method.pod | 63 |
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 | ||
5 | DSA_set_default_method, DSA_get_default_method, DSA_set_method, | 5 | DSA_set_default_openssl_method, DSA_get_default_openssl_method, |
6 | DSA_new_method, DSA_OpenSSL - select RSA method | 6 | DSA_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. | |||
28 | Initially, the default is to use the OpenSSL internal implementation. | 29 | Initially, the default is to use the OpenSSL internal implementation. |
29 | DSA_OpenSSL() returns a pointer to that method. | 30 | DSA_OpenSSL() returns a pointer to that method. |
30 | 31 | ||
31 | DSA_set_default_method() makes B<meth> the default method for all B<DSA> | 32 | DSA_set_default_openssl_method() makes B<meth> the default method for |
32 | structures created later. | 33 | all DSA structures created later. B<NB:> This is true only whilst the |
34 | default engine for DSA operations remains as "openssl". ENGINEs | ||
35 | provide an encapsulation for implementations of one or more algorithms at a | ||
36 | time, and all the DSA functions mentioned here operate within the scope | ||
37 | of the default "openssl" engine. | ||
33 | 38 | ||
34 | DSA_get_default_method() returns a pointer to the current default | 39 | DSA_get_default_openssl_method() returns a pointer to the current default |
35 | method. | 40 | method for the "openssl" engine. |
36 | 41 | ||
37 | DSA_set_method() selects B<meth> for all operations using the structure B<DSA>. | 42 | DSA_set_method() selects B<engine> for all operations using the structure B<dsa>. |
38 | 43 | ||
39 | DSA_get_method() returns a pointer to the method currently selected | 44 | DSA_new_method() allocates and initializes a DSA structure so that |
40 | for B<DSA>. | 45 | B<engine> will be used for the DSA operations. If B<engine> is NULL, |
41 | 46 | the default engine for DSA operations is used. | |
42 | DSA_new_method() allocates and initializes a B<DSA> structure so that | ||
43 | B<method> will be used for the DSA operations. If B<method> is B<NULL>, | ||
44 | the 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 | ||
89 | DSA_OpenSSL(), DSA_get_default_method() and DSA_get_method() return | 92 | DSA_OpenSSL() and DSA_get_default_openssl_method() return pointers to the |
90 | pointers to the respective B<DSA_METHOD>s. | 93 | respective B<DSA_METHOD>s. |
91 | 94 | ||
92 | DSA_set_default_method() returns no value. | 95 | DSA_set_default_openssl_method() returns no value. |
93 | 96 | ||
94 | DSA_set_method() returns a pointer to the B<DSA_METHOD> previously | 97 | DSA_set_method() returns non-zero if the ENGINE associated with B<dsa> |
95 | associated with B<dsa>. | 98 | was successfully changed to B<engine>. |
96 | 99 | ||
97 | DSA_new_method() returns B<NULL> and sets an error code that can be | 100 | DSA_new_method() returns NULL and sets an error code that can be |
98 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation | 101 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation |
99 | fails. Otherwise it returns a pointer to the newly allocated | 102 | fails. Otherwise it returns a pointer to the newly allocated structure. |
100 | structure. | ||
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)> | |||
108 | DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), | 110 | DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), |
109 | DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. | 111 | DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. |
110 | 112 | ||
113 | DSA_set_default_openssl_method() and DSA_get_default_openssl_method() | ||
114 | replaced DSA_set_default_method() and DSA_get_default_method() respectively, | ||
115 | and DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s | ||
116 | rather than B<DSA_METHOD>s during development of OpenSSL 0.9.6. | ||
117 | |||
111 | =cut | 118 | =cut |