diff options
Diffstat (limited to 'recipes-kernel/cryptodev/files/0001-don-t-advertise-RSA-keygen.patch')
-rw-r--r-- | recipes-kernel/cryptodev/files/0001-don-t-advertise-RSA-keygen.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/files/0001-don-t-advertise-RSA-keygen.patch b/recipes-kernel/cryptodev/files/0001-don-t-advertise-RSA-keygen.patch new file mode 100644 index 00000000..10d6c8b5 --- /dev/null +++ b/recipes-kernel/cryptodev/files/0001-don-t-advertise-RSA-keygen.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From d30c9c64aca4a7905e1b7eb3e28e1c616191bd34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Tue, 9 Dec 2014 16:41:25 +0200 | ||
4 | Subject: [PATCH] don't advertise RSA keygen | ||
5 | |||
6 | Disable RSA keygen operations when they are not available. | ||
7 | |||
8 | Currently no testing can be done and this patch should be applied | ||
9 | selectively on platforms that have incomplete support for RSA operations | ||
10 | (for example pkc driver on C293) | ||
11 | |||
12 | Change-Id: Ic8df014623410c3cf4b0b217a246efcea8f2eeef | ||
13 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
14 | --- | ||
15 | ioctl.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/ioctl.c b/ioctl.c | ||
19 | index 53dbf64..27dc66e 100644 | ||
20 | --- a/ioctl.c | ||
21 | +++ b/ioctl.c | ||
22 | @@ -979,7 +979,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) | ||
23 | case CIOCASYMFEAT: | ||
24 | ses = 0; | ||
25 | if (crypto_has_alg("pkc(rsa)", 0, 0)) | ||
26 | - ses = CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_RSA_GENERATE_KEY; | ||
27 | + ses = CRF_MOD_EXP_CRT | CRF_MOD_EXP ; | ||
28 | if (crypto_has_alg("pkc(dsa)", 0, 0)) | ||
29 | ses |= CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DSA_GENERATE_KEY; | ||
30 | if (crypto_has_alg("pkc(dh)", 0, 0)) | ||
31 | -- | ||
32 | 2.3.5 | ||
33 | |||