diff options
author | beck <> | 2000-04-13 16:26:12 +0000 |
---|---|---|
committer | beck <> | 2000-04-13 16:26:12 +0000 |
commit | dfa20ce54a440b3d1ffc435c4aa35a0b27388acd (patch) | |
tree | 9efff259c091c472dc1f94ab6a52bbdb4f5ba253 /src | |
parent | 33b1e2e130df8312b94c88d76beefec1714a117e (diff) | |
download | openbsd-dfa20ce54a440b3d1ffc435c4aa35a0b27388acd.tar.gz openbsd-dfa20ce54a440b3d1ffc435c4aa35a0b27388acd.tar.bz2 openbsd-dfa20ce54a440b3d1ffc435c4aa35a0b27388acd.zip |
Fix an oopsie so these get initialized even when RSA isn't there,
thanks niklas@
*WARNING* - this breaks the patch used in the "ssl26" port - you'll
need to use the new minty ssl-intl port, coming right after this
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 13 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa_eay.c | 13 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index 179b7da90a..f835be8afc 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -184,6 +184,9 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, | |||
184 | unsigned char *buf=NULL; | 184 | unsigned char *buf=NULL; |
185 | BN_CTX *ctx=NULL; | 185 | BN_CTX *ctx=NULL; |
186 | 186 | ||
187 | BN_init(&f); | ||
188 | BN_init(&ret); | ||
189 | |||
187 | /* Body of this routine removed for OpenBSD - will return | 190 | /* Body of this routine removed for OpenBSD - will return |
188 | * when the RSA patent expires | 191 | * when the RSA patent expires |
189 | */ | 192 | */ |
@@ -209,6 +212,9 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, | |||
209 | unsigned char *buf=NULL; | 212 | unsigned char *buf=NULL; |
210 | BN_CTX *ctx=NULL; | 213 | BN_CTX *ctx=NULL; |
211 | 214 | ||
215 | BN_init(&f); | ||
216 | BN_init(&ret); | ||
217 | |||
212 | /* Body of this routine removed for OpenBSD - will return | 218 | /* Body of this routine removed for OpenBSD - will return |
213 | * when the RSA patent expires | 219 | * when the RSA patent expires |
214 | */ | 220 | */ |
@@ -234,6 +240,9 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, | |||
234 | unsigned char *buf=NULL; | 240 | unsigned char *buf=NULL; |
235 | BN_CTX *ctx=NULL; | 241 | BN_CTX *ctx=NULL; |
236 | 242 | ||
243 | BN_init(&f); | ||
244 | BN_init(&ret); | ||
245 | |||
237 | /* Body of this routine removed for OpenBSD - will return | 246 | /* Body of this routine removed for OpenBSD - will return |
238 | * when the RSA patent expires | 247 | * when the RSA patent expires |
239 | */ | 248 | */ |
@@ -254,11 +263,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | |||
254 | { | 263 | { |
255 | BIGNUM r1,m1; | 264 | BIGNUM r1,m1; |
256 | int ret=0; | 265 | int ret=0; |
257 | BN_CTX *ctx; | 266 | BN_CTX *ctx = NULL; |
258 | 267 | ||
259 | if ((ctx=BN_CTX_new()) == NULL) goto err; | ||
260 | BN_init(&m1); | 268 | BN_init(&m1); |
261 | BN_init(&r1); | 269 | BN_init(&r1); |
270 | if ((ctx=BN_CTX_new()) == NULL) goto err; | ||
262 | 271 | ||
263 | /* Body of this routine removed for OpenBSD - will return | 272 | /* Body of this routine removed for OpenBSD - will return |
264 | * when the RSA patent expires | 273 | * when the RSA patent expires |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c index 179b7da90a..f835be8afc 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c | |||
@@ -184,6 +184,9 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, | |||
184 | unsigned char *buf=NULL; | 184 | unsigned char *buf=NULL; |
185 | BN_CTX *ctx=NULL; | 185 | BN_CTX *ctx=NULL; |
186 | 186 | ||
187 | BN_init(&f); | ||
188 | BN_init(&ret); | ||
189 | |||
187 | /* Body of this routine removed for OpenBSD - will return | 190 | /* Body of this routine removed for OpenBSD - will return |
188 | * when the RSA patent expires | 191 | * when the RSA patent expires |
189 | */ | 192 | */ |
@@ -209,6 +212,9 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, | |||
209 | unsigned char *buf=NULL; | 212 | unsigned char *buf=NULL; |
210 | BN_CTX *ctx=NULL; | 213 | BN_CTX *ctx=NULL; |
211 | 214 | ||
215 | BN_init(&f); | ||
216 | BN_init(&ret); | ||
217 | |||
212 | /* Body of this routine removed for OpenBSD - will return | 218 | /* Body of this routine removed for OpenBSD - will return |
213 | * when the RSA patent expires | 219 | * when the RSA patent expires |
214 | */ | 220 | */ |
@@ -234,6 +240,9 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, | |||
234 | unsigned char *buf=NULL; | 240 | unsigned char *buf=NULL; |
235 | BN_CTX *ctx=NULL; | 241 | BN_CTX *ctx=NULL; |
236 | 242 | ||
243 | BN_init(&f); | ||
244 | BN_init(&ret); | ||
245 | |||
237 | /* Body of this routine removed for OpenBSD - will return | 246 | /* Body of this routine removed for OpenBSD - will return |
238 | * when the RSA patent expires | 247 | * when the RSA patent expires |
239 | */ | 248 | */ |
@@ -254,11 +263,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | |||
254 | { | 263 | { |
255 | BIGNUM r1,m1; | 264 | BIGNUM r1,m1; |
256 | int ret=0; | 265 | int ret=0; |
257 | BN_CTX *ctx; | 266 | BN_CTX *ctx = NULL; |
258 | 267 | ||
259 | if ((ctx=BN_CTX_new()) == NULL) goto err; | ||
260 | BN_init(&m1); | 268 | BN_init(&m1); |
261 | BN_init(&r1); | 269 | BN_init(&r1); |
270 | if ((ctx=BN_CTX_new()) == NULL) goto err; | ||
262 | 271 | ||
263 | /* Body of this routine removed for OpenBSD - will return | 272 | /* Body of this routine removed for OpenBSD - will return |
264 | * when the RSA patent expires | 273 | * when the RSA patent expires |