diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa.h | 31 |
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 |
| 63 | extern "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 | ||
| 73 | extern "C" { | ||
| 74 | #endif | ||
| 75 | |||
| 73 | typedef struct rsa_st RSA; | 76 | typedef struct rsa_st RSA; |
| 74 | 77 | ||
| 75 | typedef struct rsa_meth_st | 78 | typedef 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 | ||
| 167 | RSA * RSA_new(void); | 174 | RSA * RSA_new(void); |
| 175 | #if 0 | ||
| 168 | RSA * RSA_new_method(RSA_METHOD *method); | 176 | RSA * RSA_new_method(RSA_METHOD *method); |
| 177 | #else | ||
| 178 | RSA * RSA_new_method(struct engine_st *engine); | ||
| 179 | #endif | ||
| 169 | int RSA_size(RSA *); | 180 | int RSA_size(RSA *); |
| 170 | RSA * RSA_generate_key(int bits, unsigned long e,void | 181 | RSA * 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 | ||
| 184 | int RSA_flags(RSA *r); | 195 | int RSA_flags(RSA *r); |
| 185 | 196 | ||
| 186 | void RSA_set_default_method(RSA_METHOD *meth); | 197 | void RSA_set_default_openssl_method(RSA_METHOD *meth); |
| 187 | RSA_METHOD *RSA_get_default_method(void); | 198 | RSA_METHOD *RSA_get_default_openssl_method(void); |
| 188 | RSA_METHOD *RSA_get_method(RSA *rsa); | 199 | RSA_METHOD *RSA_get_method(RSA *rsa); |
| 200 | #if 0 | ||
| 189 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); | 201 | RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth); |
| 202 | #else | ||
| 203 | int 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 */ |
| 192 | int RSA_memory_lock(RSA *r); | 207 | int RSA_memory_lock(RSA *r); |
| @@ -209,10 +224,14 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp); | |||
| 209 | int RSA_print_fp(FILE *fp, RSA *r,int offset); | 224 | int RSA_print_fp(FILE *fp, RSA *r,int offset); |
| 210 | #endif | 225 | #endif |
| 211 | 226 | ||
| 212 | #ifdef HEADER_BIO_H | 227 | #ifndef NO_BIO |
| 213 | int RSA_print(BIO *bp, RSA *r,int offset); | 228 | int RSA_print(BIO *bp, RSA *r,int offset); |
| 214 | #endif | 229 | #endif |
| 215 | 230 | ||
| 231 | int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey); | ||
| 232 | RSA *d2i_RSA_NET(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey); | ||
| 233 | RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length, int (*cb)(), int sgckey); | ||
| 234 | |||
| 216 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); | 235 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); |
| 217 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); | 236 | RSA *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 |
