summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-07-01 15:25:17 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-07-01 15:25:17 +0000
commitcaddf00d786cdaec6150ced1358eced932b993e3 (patch)
tree1e665d8b6aa11b9ea16bdac694616c2e83d7d7d0 /crypto/engine
parente105098b3f3f04dce130d067ac98e91d03884bbb (diff)
PR: 1974(partial)
Submitted by: David McCullough <david_mccullough@securecomputing.com> Approved by: steve@openssl.org Fix up RSA API compliance for rsa_nocrt_mod_exp method.
Diffstat (limited to 'crypto/engine')
-rw-r--r--crypto/engine/eng_cryptodev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
index 16afaf7fa3..b5a8a7fd7e 100644
--- a/crypto/engine/eng_cryptodev.c
+++ b/crypto/engine/eng_cryptodev.c
@@ -100,7 +100,7 @@ static int cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r,
static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I,
- RSA *rsa);
+ RSA *rsa, BN_CTX *ctx);
static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
@@ -757,11 +757,9 @@ err:
}
static int
-cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa)
+cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
{
int r;
- BN_CTX *ctx;
-
ctx = BN_CTX_new();
r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL);
BN_CTX_free(ctx);