summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa.h
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/rsa/rsa.h
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/rsa/rsa.h')
-rw-r--r--src/lib/libcrypto/rsa/rsa.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index f9f9b5cfe9..bda636a365 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -59,10 +59,9 @@
59#ifndef HEADER_RSA_H 59#ifndef HEADER_RSA_H
60#define HEADER_RSA_H 60#define HEADER_RSA_H
61 61
62#ifdef __cplusplus 62#ifndef NO_BIO
63extern "C" { 63#include <openssl/bio.h>
64#endif 64#endif
65
66#include <openssl/bn.h> 65#include <openssl/bn.h>
67#include <openssl/crypto.h> 66#include <openssl/crypto.h>
68 67
@@ -70,6 +69,10 @@ extern "C" {
70#error RSA is disabled. 69#error RSA is disabled.
71#endif 70#endif
72 71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
73typedef struct rsa_st RSA; 76typedef struct rsa_st RSA;
74 77
75typedef struct rsa_meth_st 78typedef struct rsa_meth_st
@@ -111,7 +114,11 @@ struct rsa_st
111 * this is passed instead of aEVP_PKEY, it is set to 0 */ 114 * this is passed instead of aEVP_PKEY, it is set to 0 */
112 int pad; 115 int pad;
113 int version; 116 int version;
117#if 0
114 RSA_METHOD *meth; 118 RSA_METHOD *meth;
119#else
120 struct engine_st *engine;
121#endif
115 BIGNUM *n; 122 BIGNUM *n;
116 BIGNUM *e; 123 BIGNUM *e;
117 BIGNUM *d; 124 BIGNUM *d;
@@ -165,7 +172,11 @@ struct rsa_st
165#define RSA_get_app_data(s) RSA_get_ex_data(s,0) 172#define RSA_get_app_data(s) RSA_get_ex_data(s,0)
166 173
167RSA * RSA_new(void); 174RSA * RSA_new(void);
175#if 0
168RSA * RSA_new_method(RSA_METHOD *method); 176RSA * RSA_new_method(RSA_METHOD *method);
177#else
178RSA * RSA_new_method(struct engine_st *engine);
179#endif
169int RSA_size(RSA *); 180int RSA_size(RSA *);
170RSA * RSA_generate_key(int bits, unsigned long e,void 181RSA * RSA_generate_key(int bits, unsigned long e,void
171 (*callback)(int,int,void *),void *cb_arg); 182 (*callback)(int,int,void *),void *cb_arg);
@@ -183,10 +194,14 @@ void RSA_free (RSA *r);
183 194
184int RSA_flags(RSA *r); 195int RSA_flags(RSA *r);
185 196
186void RSA_set_default_method(RSA_METHOD *meth); 197void RSA_set_default_openssl_method(RSA_METHOD *meth);
187RSA_METHOD *RSA_get_default_method(void); 198RSA_METHOD *RSA_get_default_openssl_method(void);
188RSA_METHOD *RSA_get_method(RSA *rsa); 199RSA_METHOD *RSA_get_method(RSA *rsa);
200#if 0
189RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); 201RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth);
202#else
203int RSA_set_method(RSA *rsa, struct engine_st *engine);
204#endif
190 205
191/* This function needs the memory locking malloc callbacks to be installed */ 206/* This function needs the memory locking malloc callbacks to be installed */
192int RSA_memory_lock(RSA *r); 207int RSA_memory_lock(RSA *r);
@@ -209,10 +224,14 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp);
209int RSA_print_fp(FILE *fp, RSA *r,int offset); 224int RSA_print_fp(FILE *fp, RSA *r,int offset);
210#endif 225#endif
211 226
212#ifdef HEADER_BIO_H 227#ifndef NO_BIO
213int RSA_print(BIO *bp, RSA *r,int offset); 228int RSA_print(BIO *bp, RSA *r,int offset);
214#endif 229#endif
215 230
231int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey);
232RSA *d2i_RSA_NET(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey);
233RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey);
234
216int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); 235int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)());
217RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); 236RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)());
218/* Naughty internal function required elsewhere, to handle a MS structure 237/* Naughty internal function required elsewhere, to handle a MS structure