提交 2c772c87 编写于 作者: D Dr. Stephen Henson

don't mix definitions and code

上级 e7f5b1cd
...@@ -1018,13 +1018,13 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ...@@ -1018,13 +1018,13 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
kop.crk_iparams = 3; kop.crk_iparams = 3;
if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) { if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) {
printf("OCF asym process failed, Running in software\n");
const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
printf("OCF asym process failed, Running in software\n");
ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont);
} else if (ECANCELED == kop.crk_status) { } else if (ECANCELED == kop.crk_status) {
printf("OCF hardware operation cancelled. Running in Software\n");
const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
printf("OCF hardware operation cancelled. Running in Software\n");
ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont);
} }
/* else cryptodev operation worked ok ==> ret = 1*/ /* else cryptodev operation worked ok ==> ret = 1*/
...@@ -1073,13 +1073,13 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) ...@@ -1073,13 +1073,13 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
kop.crk_iparams = 6; kop.crk_iparams = 6;
if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) {
printf("OCF asym process failed, running in Software\n");
const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
printf("OCF asym process failed, running in Software\n");
ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx);
} else if (ECANCELED == kop.crk_status) { } else if (ECANCELED == kop.crk_status) {
printf("OCF hardware operation cancelled. Running in Software\n");
const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
printf("OCF hardware operation cancelled. Running in Software\n");
ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx);
} }
/* else cryptodev operation worked ok ==> ret = 1*/ /* else cryptodev operation worked ok ==> ret = 1*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册