diff options
Diffstat (limited to 'recipes-kernel/cryptodev/files/0016-add-basic-detection-of-asym-features.patch')
-rw-r--r-- | recipes-kernel/cryptodev/files/0016-add-basic-detection-of-asym-features.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/recipes-kernel/cryptodev/files/0016-add-basic-detection-of-asym-features.patch b/recipes-kernel/cryptodev/files/0016-add-basic-detection-of-asym-features.patch deleted file mode 100644 index cefb6dcc..00000000 --- a/recipes-kernel/cryptodev/files/0016-add-basic-detection-of-asym-features.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 586bc4a6cd1014c57364020013062f07a8861e38 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Mon, 20 Apr 2015 13:18:47 +0300 | ||
4 | Subject: [PATCH] add basic detection of asym features | ||
5 | |||
6 | Change-Id: I3b3ba8664bf631a63be1f11e715024509e20f841 | ||
7 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
8 | --- | ||
9 | ioctl.c | 12 ++++++++---- | ||
10 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/ioctl.c b/ioctl.c | ||
13 | index da3a842..53dbf64 100644 | ||
14 | --- a/ioctl.c | ||
15 | +++ b/ioctl.c | ||
16 | @@ -977,10 +977,14 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) | ||
17 | |||
18 | switch (cmd) { | ||
19 | case CIOCASYMFEAT: | ||
20 | - return put_user(CRF_MOD_EXP_CRT | CRF_MOD_EXP | CRF_DSA_SIGN | | ||
21 | - CRF_DSA_VERIFY | CRF_DH_COMPUTE_KEY | | ||
22 | - CRF_DSA_GENERATE_KEY | CRF_DH_GENERATE_KEY | | ||
23 | - CRF_RSA_GENERATE_KEY, p); | ||
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 | + if (crypto_has_alg("pkc(dsa)", 0, 0)) | ||
28 | + ses |= CRF_DSA_SIGN | CRF_DSA_VERIFY | CRF_DSA_GENERATE_KEY; | ||
29 | + if (crypto_has_alg("pkc(dh)", 0, 0)) | ||
30 | + ses |= CRF_DH_COMPUTE_KEY |CRF_DH_GENERATE_KEY; | ||
31 | + return put_user(ses, p); | ||
32 | case CRIOGET: | ||
33 | fd = clonefd(filp); | ||
34 | ret = put_user(fd, p); | ||
35 | -- | ||
36 | 2.3.5 | ||
37 | |||