summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RSA_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/RSA_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/RSA_set_method.pod')
-rw-r--r--src/lib/libcrypto/doc/RSA_set_method.pod60
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
5RSA_set_default_method, RSA_get_default_method, RSA_set_method, 5RSA_set_default_method, RSA_get_default_method, RSA_set_method,
6RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref, 6RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref,
7RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method 7RSA_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
46C<-DRSA_NULL>. These methods may be useful in the USA because of a 47C<-DRSA_NULL>. These methods may be useful in the USA because of a
47patent on the RSA cryptosystem. 48patent on the RSA cryptosystem.
48 49
49RSA_set_default_method() makes B<meth> the default method for all B<RSA> 50RSA_set_default_openssl_method() makes B<meth> the default method for all B<RSA>
50structures created later. 51structures created later. B<NB:> This is true only whilst the default engine
52for RSA operations remains as "openssl". ENGINEs provide an
53encapsulation for implementations of one or more algorithms at a time, and all
54the RSA functions mentioned here operate within the scope of the default
55"openssl" engine.
51 56
52RSA_get_default_method() returns a pointer to the current default 57RSA_get_default_openssl_method() returns a pointer to the current default
53method. 58method for the "openssl" engine.
54 59
55RSA_set_method() selects B<meth> for all operations using the key 60RSA_set_method() selects B<engine> for all operations using the key
56B<rsa>. 61B<rsa>.
57 62
58RSA_get_method() returns a pointer to the method currently selected 63RSA_get_method() returns a pointer to the RSA_METHOD from the currently
59for B<rsa>. 64selected ENGINE for B<rsa>.
60 65
61RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. 66RSA_flags() returns the B<flags> that are set for B<rsa>'s current method.
62 67
63RSA_new_method() allocates and initializes an B<RSA> structure so that 68RSA_new_method() allocates and initializes an RSA structure so that
64B<method> will be used for the RSA operations. If B<method> is B<NULL>, 69B<engine> will be used for the RSA operations. If B<engine> is NULL,
65the default method is used. 70the 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
130RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(), 135RSA_PKCS1_SSLeay(), RSA_PKCS1_RSAref(), RSA_PKCS1_null_method(),
131RSA_get_default_method() and RSA_get_method() return pointers to the 136RSA_get_default_openssl_method() and RSA_get_method() return pointers to
132respective B<RSA_METHOD>s. 137the respective RSA_METHODs.
133 138
134RSA_set_default_method() returns no value. 139RSA_set_default_openssl_method() returns no value.
135 140
136RSA_set_method() returns a pointer to the B<RSA_METHOD> previously 141RSA_set_method() selects B<engine> as the engine that will be responsible for
137associated with B<rsa>. 142all operations using the structure B<rsa>. If this function completes successfully,
143then the B<rsa> structure will have its own functional reference of B<engine>, so
144the caller should remember to free their own reference to B<engine> when they are
145finished with it. NB: An ENGINE's RSA_METHOD can be retrieved (or set) by
146ENGINE_get_RSA() or ENGINE_set_RSA().
138 147
139RSA_new_method() returns B<NULL> and sets an error code that can be 148RSA_new_method() returns NULL and sets an error code that can be
140obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it 149obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise
141returns a pointer to the newly allocated structure. 150it 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
151well as the rsa_sign and rsa_verify components of RSA_METHOD were 160well as the rsa_sign and rsa_verify components of RSA_METHOD were
152added in OpenSSL 0.9.4. 161added in OpenSSL 0.9.4.
153 162
163RSA_set_default_openssl_method() and RSA_get_default_openssl_method()
164replaced RSA_set_default_method() and RSA_get_default_method() respectively,
165and RSA_set_method() and RSA_new_method() were altered to use B<ENGINE>s
166rather than B<DH_METHOD>s during development of OpenSSL 0.9.6.
167
154=cut 168=cut