diff options
author | Cristian Stoica <cristian.stoica@nxp.com> | 2016-01-25 11:19:43 +0200 |
---|---|---|
committer | Zhenhua Luo <zhenhua.luo@nxp.com> | 2016-06-23 10:58:51 +0800 |
commit | 41d1478e1294d06f0cce58fe847c0b0f1706b808 (patch) | |
tree | 8c6c5e2887cc30435ee40e764bb2ede58278d0ac /recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch | |
parent | e3956ffbc217e468e26c9ce2e8932d3720fabca4 (diff) | |
download | meta-fsl-ppc-41d1478e1294d06f0cce58fe847c0b0f1706b808.tar.gz |
cryptodev-qoriq: upgrade to 1.8 plus fsl patches
upstream commit: 87b56e04b24c6d4be145483477eff7d3153290e9
Also:
- move all fsl patches on top of cryptodev-1.8
- add CIOCHASH ioctl
- fix incorrect tests initializations
- modify yocto patches to match updated Makefiles
Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch')
-rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch b/recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch new file mode 100644 index 0000000..9301349 --- /dev/null +++ b/recipes-kernel/cryptodev/sdk_patches/0016-add-basic-detection-of-asym-features.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 4ce4081d9abef651473e9d7e089a0748f77db631 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 16/38] 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.7.0 | ||
37 | |||