From: beck Date: Thu, 13 Apr 2000 16:26:12 +0000 (+0000) Subject: Fix an oopsie so these get initialized even when RSA isn't there, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f1aa834436a332b72c5f52f80a4e9123b95001c1;p=openbsd 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 --- diff --git a/lib/libcrypto/rsa/rsa_eay.c b/lib/libcrypto/rsa/rsa_eay.c index 179b7da90a8..f835be8afc9 100644 --- a/lib/libcrypto/rsa/rsa_eay.c +++ b/lib/libcrypto/rsa/rsa_eay.c @@ -184,6 +184,9 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -209,6 +212,9 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -234,6 +240,9 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -254,11 +263,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) { BIGNUM r1,m1; int ret=0; - BN_CTX *ctx; + BN_CTX *ctx = NULL; - if ((ctx=BN_CTX_new()) == NULL) goto err; BN_init(&m1); BN_init(&r1); + if ((ctx=BN_CTX_new()) == NULL) goto err; /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires diff --git a/lib/libssl/src/crypto/rsa/rsa_eay.c b/lib/libssl/src/crypto/rsa/rsa_eay.c index 179b7da90a8..f835be8afc9 100644 --- a/lib/libssl/src/crypto/rsa/rsa_eay.c +++ b/lib/libssl/src/crypto/rsa/rsa_eay.c @@ -184,6 +184,9 @@ static int RSA_eay_private_encrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -209,6 +212,9 @@ static int RSA_eay_private_decrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -234,6 +240,9 @@ static int RSA_eay_public_decrypt(int flen, unsigned char *from, unsigned char *buf=NULL; BN_CTX *ctx=NULL; + BN_init(&f); + BN_init(&ret); + /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires */ @@ -254,11 +263,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) { BIGNUM r1,m1; int ret=0; - BN_CTX *ctx; + BN_CTX *ctx = NULL; - if ((ctx=BN_CTX_new()) == NULL) goto err; BN_init(&m1); BN_init(&r1); + if ((ctx=BN_CTX_new()) == NULL) goto err; /* Body of this routine removed for OpenBSD - will return * when the RSA patent expires