aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-04-08 06:32:48 +0000
committerRichard Levitte <levitte@openssl.org>2003-04-08 06:32:48 +0000
commit53fd7688ee89a4a96c6f35da5c233c45ce0cfeab (patch)
tree137d0c897409d821f86b7ed7cd43b2dcb50537aa
parent5949e8e1dd0777dacd34ba999d66f67fbeea085e (diff)
downloadopenssl-53fd7688ee89a4a96c6f35da5c233c45ce0cfeab.tar.gz
Adapt method retrieval to the engine variant.
-rw-r--r--crypto/rsa/rsa_eay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index dbabd07c9f..0ba50b8e87 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -214,6 +214,7 @@ static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx)
static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx)
{
+ const RSA_METHOD *meth;
BIGNUM *A, *Ai;
BN_BLINDING *ret = NULL;
@@ -223,6 +224,7 @@ static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx)
* this should be placed in a new function of its own, but for reasons
* of binary compatibility can't */
+ meth = ENGINE_get_RSA(rsa->engine);
BN_CTX_start(ctx);
A = BN_CTX_get(ctx);
if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)
@@ -237,7 +239,7 @@ static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx)
}
if ((Ai=BN_mod_inverse(NULL,A,rsa->n,ctx)) == NULL) goto err;
- if (!rsa->meth->bn_mod_exp(A,A,rsa->e,rsa->n,ctx,rsa->_method_mod_n))
+ if (!meth->bn_mod_exp(A,A,rsa->e,rsa->n,ctx,rsa->_method_mod_n))
goto err;
ret = BN_BLINDING_new(A,Ai,rsa->n);
BN_free(Ai);