diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/doc/DH_set_method.pod | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/doc/DH_set_method.pod')
-rw-r--r-- | src/lib/libcrypto/doc/DH_set_method.pod | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/src/lib/libcrypto/doc/DH_set_method.pod b/src/lib/libcrypto/doc/DH_set_method.pod index a8f75bdd9d..62088eea1b 100644 --- a/src/lib/libcrypto/doc/DH_set_method.pod +++ b/src/lib/libcrypto/doc/DH_set_method.pod | |||
@@ -2,20 +2,21 @@ | |||
2 | 2 | ||
3 | =head1 NAME | 3 | =head1 NAME |
4 | 4 | ||
5 | DH_set_default_method, DH_get_default_method, DH_set_method, | 5 | DH_set_default_openssl_method, DH_get_default_openssl_method, |
6 | DH_new_method, DH_OpenSSL - select DH method | 6 | DH_set_method, DH_new_method, DH_OpenSSL - select DH method |
7 | 7 | ||
8 | =head1 SYNOPSIS | 8 | =head1 SYNOPSIS |
9 | 9 | ||
10 | #include <openssl/dh.h> | 10 | #include <openssl/dh.h> |
11 | #include <openssl/engine.h> | ||
11 | 12 | ||
12 | void DH_set_default_method(DH_METHOD *meth); | 13 | void DH_set_default_openssl_method(DH_METHOD *meth); |
13 | 14 | ||
14 | DH_METHOD *DH_get_default_method(void); | 15 | DH_METHOD *DH_get_default_openssl_method(void); |
15 | 16 | ||
16 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | 17 | int DH_set_method(DH *dh, ENGINE *engine); |
17 | 18 | ||
18 | DH *DH_new_method(DH_METHOD *meth); | 19 | DH *DH_new_method(ENGINE *engine); |
19 | 20 | ||
20 | DH_METHOD *DH_OpenSSL(void); | 21 | DH_METHOD *DH_OpenSSL(void); |
21 | 22 | ||
@@ -28,20 +29,26 @@ 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 | DH_OpenSSL() returns a pointer to that method. | 30 | DH_OpenSSL() returns a pointer to that method. |
30 | 31 | ||
31 | DH_set_default_method() makes B<meth> the default method for all B<DH> | 32 | DH_set_default_openssl_method() makes B<meth> the default method for all DH |
32 | structures created later. | 33 | structures created later. B<NB:> This is true only whilst the default engine |
34 | for Diffie-Hellman operations remains as "openssl". ENGINEs provide an | ||
35 | encapsulation for implementations of one or more algorithms, and all the DH | ||
36 | functions mentioned here operate within the scope of the default | ||
37 | "openssl" engine. | ||
33 | 38 | ||
34 | DH_get_default_method() returns a pointer to the current default | 39 | DH_get_default_openssl_method() returns a pointer to the current default |
35 | method. | 40 | method for the "openssl" engine. |
36 | 41 | ||
37 | DH_set_method() selects B<meth> for all operations using the structure B<dh>. | 42 | DH_set_method() selects B<engine> as the engine that will be responsible for |
43 | all operations using the structure B<dh>. If this function completes successfully, | ||
44 | then the B<dh> structure will have its own functional reference of B<engine>, so | ||
45 | the caller should remember to free their own reference to B<engine> when they are | ||
46 | finished with it. NB: An ENGINE's DH_METHOD can be retrieved (or set) by | ||
47 | ENGINE_get_DH() or ENGINE_set_DH(). | ||
38 | 48 | ||
39 | DH_get_method() returns a pointer to the method currently selected | 49 | DH_new_method() allocates and initializes a DH structure so that |
40 | for B<dh>. | 50 | B<engine> will be used for the DH operations. If B<engine> is NULL, |
41 | 51 | the default engine for Diffie-Hellman opertaions is used. | |
42 | DH_new_method() allocates and initializes a B<DH> structure so that | ||
43 | B<method> will be used for the DH operations. If B<method> is B<NULL>, | ||
44 | the default method is used. | ||
45 | 52 | ||
46 | =head1 THE DH_METHOD STRUCTURE | 53 | =head1 THE DH_METHOD STRUCTURE |
47 | 54 | ||
@@ -75,17 +82,17 @@ the default method is used. | |||
75 | 82 | ||
76 | =head1 RETURN VALUES | 83 | =head1 RETURN VALUES |
77 | 84 | ||
78 | DH_OpenSSL(), DH_get_default_method() and DH_get_method() return | 85 | DH_OpenSSL() and DH_get_default_method() return pointers to the respective |
79 | pointers to the respective B<DH_METHOD>s. | 86 | DH_METHODs. |
80 | 87 | ||
81 | DH_set_default_method() returns no value. | 88 | DH_set_default_openssl_method() returns no value. |
82 | 89 | ||
83 | DH_set_method() returns a pointer to the B<DH_METHOD> previously | 90 | DH_set_method() returns non-zero if the ENGINE associated with B<dh> |
84 | associated with B<dh>. | 91 | was successfully changed to B<engine>. |
85 | 92 | ||
86 | DH_new_method() returns B<NULL> and sets an error code that can be | 93 | DH_new_method() returns NULL and sets an error code that can be |
87 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it | 94 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. |
88 | returns a pointer to the newly allocated structure. | 95 | Otherwise it returns a pointer to the newly allocated structure. |
89 | 96 | ||
90 | =head1 SEE ALSO | 97 | =head1 SEE ALSO |
91 | 98 | ||
@@ -96,4 +103,9 @@ L<dh(3)|dh(3)>, L<DH_new(3)|DH_new(3)> | |||
96 | DH_set_default_method(), DH_get_default_method(), DH_set_method(), | 103 | DH_set_default_method(), DH_get_default_method(), DH_set_method(), |
97 | DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. | 104 | DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. |
98 | 105 | ||
106 | DH_set_default_openssl_method() and DH_get_default_openssl_method() | ||
107 | replaced DH_set_default_method() and DH_get_default_method() respectively, | ||
108 | and DH_set_method() and DH_new_method() were altered to use B<ENGINE>s | ||
109 | rather than B<DH_METHOD>s during development of OpenSSL 0.9.6. | ||
110 | |||
99 | =cut | 111 | =cut |