projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In BIO_write(), update the write statistics, not the read statistics.
[oweals/openssl.git]
/
engines
/
e_cswift.c
diff --git
a/engines/e_cswift.c
b/engines/e_cswift.c
index e67379e23e62c1c9ff6a51044c642af51d6335bb..bc6517984649850c6ccb3d32f9b3af5c44a5c909 100644
(file)
--- a/
engines/e_cswift.c
+++ b/
engines/e_cswift.c
@@
-744,6
+744,12
@@
static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx
int to_return = 0;
const RSA_METHOD * def_rsa_method;
int to_return = 0;
const RSA_METHOD * def_rsa_method;
+ if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
+ {
+ CSWIFTerr(CSWIFT_F_CSWIFT_RSA_MOD_EXP,CSWIFT_R_MISSING_KEY_COMPONENTS);
+ goto err;
+ }
+
/* Try the limits of RSA (2048 bits) */
if(BN_num_bytes(rsa->p) > 128 ||
BN_num_bytes(rsa->q) > 128 ||
/* Try the limits of RSA (2048 bits) */
if(BN_num_bytes(rsa->p) > 128 ||
BN_num_bytes(rsa->q) > 128 ||
@@
-764,11
+770,6
@@
static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx
return def_rsa_method->rsa_mod_exp(r0, I, rsa, ctx);
}
return def_rsa_method->rsa_mod_exp(r0, I, rsa, ctx);
}
- if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
- {
- CSWIFTerr(CSWIFT_F_CSWIFT_RSA_MOD_EXP,CSWIFT_R_MISSING_KEY_COMPONENTS);
- goto err;
- }
to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1,
rsa->dmq1, rsa->iqmp, ctx);
err:
to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1,
rsa->dmq1, rsa->iqmp, ctx);
err: