diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/dh/dh.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h index c15b2ad483..7a8d9f88c2 100644 --- a/src/lib/libcrypto/dh/dh.h +++ b/src/lib/libcrypto/dh/dh.h | |||
| @@ -59,19 +59,22 @@ | |||
| 59 | #ifndef HEADER_DH_H | 59 | #ifndef HEADER_DH_H |
| 60 | #define HEADER_DH_H | 60 | #define HEADER_DH_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_DH | 62 | #ifdef NO_DH |
| 67 | #error DH is disabled. | 63 | #error DH is disabled. |
| 68 | #endif | 64 | #endif |
| 69 | 65 | ||
| 66 | #ifndef NO_BIO | ||
| 67 | #include <openssl/bio.h> | ||
| 68 | #endif | ||
| 70 | #include <openssl/bn.h> | 69 | #include <openssl/bn.h> |
| 71 | #include <openssl/crypto.h> | 70 | #include <openssl/crypto.h> |
| 72 | 71 | ||
| 73 | #define DH_FLAG_CACHE_MONT_P 0x01 | 72 | #define DH_FLAG_CACHE_MONT_P 0x01 |
| 74 | 73 | ||
| 74 | #ifdef __cplusplus | ||
| 75 | extern "C" { | ||
| 76 | #endif | ||
| 77 | |||
| 75 | typedef struct dh_st DH; | 78 | typedef struct dh_st DH; |
| 76 | 79 | ||
| 77 | typedef struct dh_method { | 80 | typedef struct dh_method { |
| @@ -112,7 +115,11 @@ struct dh_st | |||
| 112 | 115 | ||
| 113 | int references; | 116 | int references; |
| 114 | CRYPTO_EX_DATA ex_data; | 117 | CRYPTO_EX_DATA ex_data; |
| 118 | #if 0 | ||
| 115 | DH_METHOD *meth; | 119 | DH_METHOD *meth; |
| 120 | #else | ||
| 121 | struct engine_st *engine; | ||
| 122 | #endif | ||
| 116 | }; | 123 | }; |
| 117 | 124 | ||
| 118 | #define DH_GENERATOR_2 2 | 125 | #define DH_GENERATOR_2 2 |
| @@ -147,10 +154,15 @@ struct dh_st | |||
| 147 | 154 | ||
| 148 | DH_METHOD *DH_OpenSSL(void); | 155 | DH_METHOD *DH_OpenSSL(void); |
| 149 | 156 | ||
| 150 | void DH_set_default_method(DH_METHOD *meth); | 157 | void DH_set_default_openssl_method(DH_METHOD *meth); |
| 151 | DH_METHOD *DH_get_default_method(void); | 158 | DH_METHOD *DH_get_default_openssl_method(void); |
| 159 | #if 0 | ||
| 152 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | 160 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); |
| 153 | DH *DH_new_method(DH_METHOD *meth); | 161 | DH *DH_new_method(DH_METHOD *meth); |
| 162 | #else | ||
| 163 | int DH_set_method(DH *dh, struct engine_st *engine); | ||
| 164 | DH *DH_new_method(struct engine_st *engine); | ||
| 165 | #endif | ||
| 154 | 166 | ||
| 155 | DH * DH_new(void); | 167 | DH * DH_new(void); |
| 156 | void DH_free(DH *dh); | 168 | void DH_free(DH *dh); |
| @@ -169,7 +181,7 @@ int i2d_DHparams(DH *a,unsigned char **pp); | |||
| 169 | #ifndef NO_FP_API | 181 | #ifndef NO_FP_API |
| 170 | int DHparams_print_fp(FILE *fp, DH *x); | 182 | int DHparams_print_fp(FILE *fp, DH *x); |
| 171 | #endif | 183 | #endif |
| 172 | #ifdef HEADER_BIO_H | 184 | #ifndef NO_BIO |
| 173 | int DHparams_print(BIO *bp, DH *x); | 185 | int DHparams_print(BIO *bp, DH *x); |
| 174 | #else | 186 | #else |
| 175 | int DHparams_print(char *bp, DH *x); | 187 | int DHparams_print(char *bp, DH *x); |
