diff options
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa.h')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h index 68d9912cbc..65689a3426 100644 --- a/src/lib/libcrypto/dsa/dsa.h +++ b/src/lib/libcrypto/dsa/dsa.h | |||
@@ -65,14 +65,13 @@ | |||
65 | #ifndef HEADER_DSA_H | 65 | #ifndef HEADER_DSA_H |
66 | #define HEADER_DSA_H | 66 | #define HEADER_DSA_H |
67 | 67 | ||
68 | #ifdef __cplusplus | ||
69 | extern "C" { | ||
70 | #endif | ||
71 | |||
72 | #ifdef NO_DSA | 68 | #ifdef NO_DSA |
73 | #error DSA is disabled. | 69 | #error DSA is disabled. |
74 | #endif | 70 | #endif |
75 | 71 | ||
72 | #ifndef NO_BIO | ||
73 | #include <openssl/bio.h> | ||
74 | #endif | ||
76 | #include <openssl/bn.h> | 75 | #include <openssl/bn.h> |
77 | #include <openssl/crypto.h> | 76 | #include <openssl/crypto.h> |
78 | #ifndef NO_DH | 77 | #ifndef NO_DH |
@@ -81,6 +80,10 @@ extern "C" { | |||
81 | 80 | ||
82 | #define DSA_FLAG_CACHE_MONT_P 0x01 | 81 | #define DSA_FLAG_CACHE_MONT_P 0x01 |
83 | 82 | ||
83 | #ifdef __cplusplus | ||
84 | extern "C" { | ||
85 | #endif | ||
86 | |||
84 | typedef struct dsa_st DSA; | 87 | typedef struct dsa_st DSA; |
85 | 88 | ||
86 | typedef struct DSA_SIG_st | 89 | typedef struct DSA_SIG_st |
@@ -130,7 +133,11 @@ struct dsa_st | |||
130 | char *method_mont_p; | 133 | char *method_mont_p; |
131 | int references; | 134 | int references; |
132 | CRYPTO_EX_DATA ex_data; | 135 | CRYPTO_EX_DATA ex_data; |
136 | #if 0 | ||
133 | DSA_METHOD *meth; | 137 | DSA_METHOD *meth; |
138 | #else | ||
139 | struct engine_st *engine; | ||
140 | #endif | ||
134 | }; | 141 | }; |
135 | 142 | ||
136 | #define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \ | 143 | #define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \ |
@@ -156,12 +163,20 @@ int DSA_do_verify(const unsigned char *dgst,int dgst_len, | |||
156 | 163 | ||
157 | DSA_METHOD *DSA_OpenSSL(void); | 164 | DSA_METHOD *DSA_OpenSSL(void); |
158 | 165 | ||
159 | void DSA_set_default_method(DSA_METHOD *); | 166 | void DSA_set_default_openssl_method(DSA_METHOD *); |
160 | DSA_METHOD *DSA_get_default_method(void); | 167 | DSA_METHOD *DSA_get_default_openssl_method(void); |
168 | #if 0 | ||
161 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *); | 169 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *); |
170 | #else | ||
171 | int DSA_set_method(DSA *dsa, struct engine_st *engine); | ||
172 | #endif | ||
162 | 173 | ||
163 | DSA * DSA_new(void); | 174 | DSA * DSA_new(void); |
175 | #if 0 | ||
164 | DSA * DSA_new_method(DSA_METHOD *meth); | 176 | DSA * DSA_new_method(DSA_METHOD *meth); |
177 | #else | ||
178 | DSA * DSA_new_method(struct engine_st *engine); | ||
179 | #endif | ||
165 | int DSA_size(DSA *); | 180 | int DSA_size(DSA *); |
166 | /* next 4 return -1 on error */ | 181 | /* next 4 return -1 on error */ |
167 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); | 182 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); |
@@ -188,7 +203,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp); | |||
188 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); | 203 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); |
189 | int i2d_DSAparams(DSA *a,unsigned char **pp); | 204 | int i2d_DSAparams(DSA *a,unsigned char **pp); |
190 | 205 | ||
191 | #ifdef HEADER_BIO_H | 206 | #ifndef NO_BIO |
192 | int DSAparams_print(BIO *bp, DSA *x); | 207 | int DSAparams_print(BIO *bp, DSA *x); |
193 | int DSA_print(BIO *bp, DSA *x, int off); | 208 | int DSA_print(BIO *bp, DSA *x, int off); |
194 | #endif | 209 | #endif |