summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch
deleted file mode 100644
index 6c46061e..00000000
--- a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0041-cryptodev-check-for-errors-inside-cryptodev_rsa_mod_.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From c714cb7a33e994ff2278149d4a7a20a21215a2f6 Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Mon, 8 Feb 2016 17:04:25 +0200
4Subject: [PATCH 41/48] cryptodev: check for errors inside
5 cryptodev_rsa_mod_exp
6
7Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
8---
9 crypto/engine/eng_cryptodev.c | 24 ++++++++++++++++++------
10 1 file changed, 18 insertions(+), 6 deletions(-)
11
12diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
13index aac2740..e419bef 100644
14--- a/crypto/engine/eng_cryptodev.c
15+++ b/crypto/engine/eng_cryptodev.c
16@@ -2067,12 +2067,24 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
17 kop.crk_status = 0;
18 kop.crk_op = CRK_MOD_EXP_CRT;
19 f_len = BN_num_bytes(rsa->n);
20- spcf_bn2bin_ex(I, &f, &f_len);
21- spcf_bn2bin(rsa->p, &p, &p_len);
22- spcf_bn2bin(rsa->q, &q, &q_len);
23- spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len);
24- spcf_bn2bin_ex(rsa->iqmp, &c, &p_len);
25- spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len);
26+ if (spcf_bn2bin_ex(I, &f, &f_len) != 0) {
27+ goto err;
28+ }
29+ if (spcf_bn2bin(rsa->p, &p, &p_len) != 0) {
30+ goto err;
31+ }
32+ if (spcf_bn2bin(rsa->q, &q, &q_len) != 0) {
33+ goto err;
34+ }
35+ if (spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len) != 0) {
36+ goto err;
37+ }
38+ if (spcf_bn2bin_ex(rsa->iqmp, &c, &p_len) != 0) {
39+ goto err;
40+ }
41+ if (spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len) != 0) {
42+ goto err;
43+ }
44 /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */
45 kop.crk_param[0].crp_p = p;
46 kop.crk_param[0].crp_nbits = p_len * 8;
47--
482.7.3
49