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/RSA_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/RSA_set_method.pod')
-rw-r--r-- | src/lib/libcrypto/doc/RSA_set_method.pod | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/src/lib/libcrypto/doc/RSA_set_method.pod b/src/lib/libcrypto/doc/RSA_set_method.pod index 14b0b4cf35..b672712292 100644 --- a/src/lib/libcrypto/doc/RSA_set_method.pod +++ b/src/lib/libcrypto/doc/RSA_set_method.pod | |||
@@ -4,17 +4,18 @@ | |||
4 | 4 | ||
5 | RSA_set_default_method, RSA_get_default_method, RSA_set_method, | 5 | RSA_set_default_method, RSA_get_default_method, RSA_set_method, |
6 | RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref, | 6 | RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref, |
7 | RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method | 7 | RSA_null_method, RSA_flags, RSA_new_method - select RSA method |
8 | 8 | ||
9 | =head1 SYNOPSIS | 9 | =head1 SYNOPSIS |
10 | 10 | ||
11 | #include <openssl/rsa.h> | 11 | #include <openssl/rsa.h> |
12 | #include <openssl/engine.h> | ||
12 | 13 | ||
13 | void RSA_set_default_method(RSA_METHOD *meth); | 14 | void RSA_set_default_openssl_method(RSA_METHOD *meth); |
14 | 15 | ||
15 | RSA_METHOD *RSA_get_default_method(void); | 16 | RSA_METHOD *RSA_get_default_openssl_method(void); |
16 | 17 | ||
17 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); | 18 | RSA_METHOD *RSA_set_method(RSA *rsa, ENGINE *engine); |
18 | 19 | ||
19 | RSA_METHOD *RSA_get_method(RSA *rsa); | 20 | RSA_METHOD *RSA_get_method(RSA *rsa); |
20 | 21 | ||
@@ -26,7 +27,7 @@ RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method | |||
26 | 27 | ||
27 | int RSA_flags(RSA *rsa); | 28 | int RSA_flags(RSA *rsa); |
28 | 29 | ||
29 | RSA *RSA_new_method(RSA_METHOD *method); | 30 | RSA *RSA_new_method(ENGINE *engine); |
30 | 31 | ||
31 | =head1 DESCRIPTION | 32 | =head1 DESCRIPTION |
32 | 33 | ||
@@ -46,23 +47,27 @@ the RSA transformation. It is the default if OpenSSL is compiled with | |||
46 | C<-DRSA_NULL>. These methods may be useful in the USA because of a | 47 | C<-DRSA_NULL>. These methods may be useful in the USA because of a |
47 | patent on the RSA cryptosystem. | 48 | patent on the RSA cryptosystem. |
48 | 49 | ||
49 | RSA_set_default_method() makes B<meth> the default method for all B<RSA> | 50 | RSA_set_default_openssl_method() makes B<meth> the default method for all B<RSA> |
50 | structures created later. | 51 | structures created later. B<NB:> This is true only whilst the default engine |
52 | for RSA operations remains as "openssl". ENGINEs provide an | ||
53 | encapsulation for implementations of one or more algorithms at a time, and all | ||
54 | the RSA functions mentioned here operate within the scope of the default | ||
55 | "openssl" engine. | ||
51 | 56 | ||
52 | RSA_get_default_method() returns a pointer to the current default | 57 | RSA_get_default_openssl_method() returns a pointer to the current default |
53 | method. | 58 | method for the "openssl" engine. |
54 | 59 | ||
55 | RSA_set_method() selects B<meth> for all operations using the key | 60 | RSA_set_method() selects B<engine> for all operations using the key |
56 | B<rsa>. | 61 | B<rsa>. |
57 | 62 | ||
58 | RSA_get_method() returns a pointer to the method currently selected | 63 | RSA_get_method() returns a pointer to the RSA_METHOD from the currently |
59 | for B<rsa>. | 64 | selected ENGINE for B<rsa>. |
60 | 65 | ||
61 | RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. | 66 | RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. |
62 | 67 | ||
63 | RSA_new_method() allocates and initializes an B<RSA> structure so that | 68 | RSA_new_method() allocates and initializes an RSA structure so that |
64 | B<method> will be used for the RSA operations. If B<method> is B<NULL>, | 69 | B<engine> will be used for the RSA operations. If B<engine> is NULL, |
65 | the default method is used. | 70 | the default engine for RSA operations is used. |
66 | 71 | ||
67 | =head1 THE RSA_METHOD STRUCTURE | 72 | =head1 THE RSA_METHOD STRUCTURE |
68 | 73 | ||
@@ -128,17 +133,21 @@ the default method is used. | |||
128 | =head1 RETURN VALUES | 133 | =head1 RETURN VALUES |
129 | 134 | ||
130 | RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(), | 135 | RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(), |
131 | RSA_get_default_method() and RSA_get_method() return pointers to the | 136 | RSA_get_default_openssl_method() and RSA_get_method() return pointers to |
132 | respective B<RSA_METHOD>s. | 137 | the respective RSA_METHODs. |
133 | 138 | ||
134 | RSA_set_default_method() returns no value. | 139 | RSA_set_default_openssl_method() returns no value. |
135 | 140 | ||
136 | RSA_set_method() returns a pointer to the B<RSA_METHOD> previously | 141 | RSA_set_method() selects B<engine> as the engine that will be responsible for |
137 | associated with B<rsa>. | 142 | all operations using the structure B<rsa>. If this function completes successfully, |
143 | then the B<rsa> structure will have its own functional reference of B<engine>, so | ||
144 | the caller should remember to free their own reference to B<engine> when they are | ||
145 | finished with it. NB: An ENGINE's RSA_METHOD can be retrieved (or set) by | ||
146 | ENGINE_get_RSA() or ENGINE_set_RSA(). | ||
138 | 147 | ||
139 | RSA_new_method() returns B<NULL> and sets an error code that can be | 148 | RSA_new_method() returns NULL and sets an error code that can be |
140 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it | 149 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise |
141 | returns a pointer to the newly allocated structure. | 150 | it returns a pointer to the newly allocated structure. |
142 | 151 | ||
143 | =head1 SEE ALSO | 152 | =head1 SEE ALSO |
144 | 153 | ||
@@ -151,4 +160,9 @@ RSA_get_default_method(), RSA_set_method() and RSA_get_method() as | |||
151 | well as the rsa_sign and rsa_verify components of RSA_METHOD were | 160 | well as the rsa_sign and rsa_verify components of RSA_METHOD were |
152 | added in OpenSSL 0.9.4. | 161 | added in OpenSSL 0.9.4. |
153 | 162 | ||
163 | RSA_set_default_openssl_method() and RSA_get_default_openssl_method() | ||
164 | replaced RSA_set_default_method() and RSA_get_default_method() respectively, | ||
165 | and RSA_set_method() and RSA_new_method() were altered to use B<ENGINE>s | ||
166 | rather than B<DH_METHOD>s during development of OpenSSL 0.9.6. | ||
167 | |||
154 | =cut | 168 | =cut |