summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/DH_set_method.pod
diff options
context:
space:
mode:
authorbeck <>2000-12-15 02:58:47 +0000
committerbeck <>2000-12-15 02:58:47 +0000
commit9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch)
tree5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/doc/DH_set_method.pod
parente131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff)
downloadopenbsd-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.pod62
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
5DH_set_default_method, DH_get_default_method, DH_set_method, 5DH_set_default_openssl_method, DH_get_default_openssl_method,
6DH_new_method, DH_OpenSSL - select DH method 6DH_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.
28Initially, the default is to use the OpenSSL internal implementation. 29Initially, the default is to use the OpenSSL internal implementation.
29DH_OpenSSL() returns a pointer to that method. 30DH_OpenSSL() returns a pointer to that method.
30 31
31DH_set_default_method() makes B<meth> the default method for all B<DH> 32DH_set_default_openssl_method() makes B<meth> the default method for all DH
32structures created later. 33structures created later. B<NB:> This is true only whilst the default engine
34for Diffie-Hellman operations remains as "openssl". ENGINEs provide an
35encapsulation for implementations of one or more algorithms, and all the DH
36functions mentioned here operate within the scope of the default
37"openssl" engine.
33 38
34DH_get_default_method() returns a pointer to the current default 39DH_get_default_openssl_method() returns a pointer to the current default
35method. 40method for the "openssl" engine.
36 41
37DH_set_method() selects B<meth> for all operations using the structure B<dh>. 42DH_set_method() selects B<engine> as the engine that will be responsible for
43all operations using the structure B<dh>. If this function completes successfully,
44then the B<dh> structure will have its own functional reference of B<engine>, so
45the caller should remember to free their own reference to B<engine> when they are
46finished with it. NB: An ENGINE's DH_METHOD can be retrieved (or set) by
47ENGINE_get_DH() or ENGINE_set_DH().
38 48
39DH_get_method() returns a pointer to the method currently selected 49DH_new_method() allocates and initializes a DH structure so that
40for B<dh>. 50B<engine> will be used for the DH operations. If B<engine> is NULL,
41 51the default engine for Diffie-Hellman opertaions is used.
42DH_new_method() allocates and initializes a B<DH> structure so that
43B<method> will be used for the DH operations. If B<method> is B<NULL>,
44the 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
78DH_OpenSSL(), DH_get_default_method() and DH_get_method() return 85DH_OpenSSL() and DH_get_default_method() return pointers to the respective
79pointers to the respective B<DH_METHOD>s. 86DH_METHODs.
80 87
81DH_set_default_method() returns no value. 88DH_set_default_openssl_method() returns no value.
82 89
83DH_set_method() returns a pointer to the B<DH_METHOD> previously 90DH_set_method() returns non-zero if the ENGINE associated with B<dh>
84associated with B<dh>. 91was successfully changed to B<engine>.
85 92
86DH_new_method() returns B<NULL> and sets an error code that can be 93DH_new_method() returns NULL and sets an error code that can be
87obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it 94obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails.
88returns a pointer to the newly allocated structure. 95Otherwise 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)>
96DH_set_default_method(), DH_get_default_method(), DH_set_method(), 103DH_set_default_method(), DH_get_default_method(), DH_set_method(),
97DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. 104DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4.
98 105
106DH_set_default_openssl_method() and DH_get_default_openssl_method()
107replaced DH_set_default_method() and DH_get_default_method() respectively,
108and DH_set_method() and DH_new_method() were altered to use B<ENGINE>s
109rather than B<DH_METHOD>s during development of OpenSSL 0.9.6.
110
99=cut 111=cut