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.
This commit is contained in:
parent
e105098b3f
commit
caddf00d78
@ -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,
|
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);
|
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,
|
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_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,
|
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);
|
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||||
@ -757,11 +757,9 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
int r;
|
||||||
BN_CTX *ctx;
|
|
||||||
|
|
||||||
ctx = BN_CTX_new();
|
ctx = BN_CTX_new();
|
||||||
r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL);
|
r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL);
|
||||||
BN_CTX_free(ctx);
|
BN_CTX_free(ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user