diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-23 16:02:25 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-28 23:26:59 -0300 |
commit | 6a868a671472d454b407a165fc31c5f7dfe783c6 (patch) | |
tree | 7bd2ab13a04d14215264cc992501970cacfb20ef /recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch | |
parent | 62e212fe4812a6c726df4ac8e77d4a77e0e54247 (diff) | |
download | meta-freescale-6a868a671472d454b407a165fc31c5f7dfe783c6.tar.gz |
Move meta-fsl-ppc content to layer root
This commit is just a rename of all contents of meta-fsl-ppc
subdirectory to this layer's root, merging the contents of common
files, subsequent changes are based on top of that.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch')
-rw-r--r-- | recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch b/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch new file mode 100644 index 00000000..16cc6882 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From ea4abc255c6c5feec01cb1e30c6082cfe47860e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 19 Feb 2015 16:11:53 +0200 | ||
4 | Subject: [PATCH 21/26] cryptodev: drop redundant function | ||
5 | |||
6 | get_dev_crypto already caches the result. Another cache in-between is | ||
7 | useless. | ||
8 | |||
9 | Change-Id: Ibd162529d3fb7a561a17f1a707d5d287c1586a3a | ||
10 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | Reviewed-on: http://git.am.freescale.net:8181/34216 | ||
12 | --- | ||
13 | crypto/engine/eng_cryptodev.c | 18 +++--------------- | ||
14 | 1 file changed, 3 insertions(+), 15 deletions(-) | ||
15 | |||
16 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
17 | index fa5fe1b..1ab5551 100644 | ||
18 | --- a/crypto/engine/eng_cryptodev.c | ||
19 | +++ b/crypto/engine/eng_cryptodev.c | ||
20 | @@ -96,7 +96,6 @@ struct dev_crypto_state { | ||
21 | |||
22 | static u_int32_t cryptodev_asymfeat = 0; | ||
23 | |||
24 | -static int get_asym_dev_crypto(void); | ||
25 | static int open_dev_crypto(void); | ||
26 | static int get_dev_crypto(void); | ||
27 | static int get_cryptodev_ciphers(const int **cnids); | ||
28 | @@ -357,17 +356,6 @@ static void put_dev_crypto(int fd) | ||
29 | #endif | ||
30 | } | ||
31 | |||
32 | -/* Caching version for asym operations */ | ||
33 | -static int | ||
34 | -get_asym_dev_crypto(void) | ||
35 | -{ | ||
36 | - static int fd = -1; | ||
37 | - | ||
38 | - if (fd == -1) | ||
39 | - fd = get_dev_crypto(); | ||
40 | - return fd; | ||
41 | -} | ||
42 | - | ||
43 | /* | ||
44 | * Find out what ciphers /dev/crypto will let us have a session for. | ||
45 | * XXX note, that some of these openssl doesn't deal with yet! | ||
46 | @@ -1796,7 +1784,7 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
47 | { | ||
48 | int fd, ret = -1; | ||
49 | |||
50 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
51 | + if ((fd = get_dev_crypto()) < 0) | ||
52 | return (ret); | ||
53 | |||
54 | if (r) { | ||
55 | @@ -2374,7 +2362,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
56 | int p_len, q_len; | ||
57 | int i; | ||
58 | |||
59 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
60 | + if ((fd = get_dev_crypto()) < 0) | ||
61 | goto sw_try; | ||
62 | |||
63 | if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; | ||
64 | @@ -3928,7 +3916,7 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) | ||
65 | BIGNUM *temp = NULL; | ||
66 | unsigned char *padded_pub_key = NULL, *p = NULL; | ||
67 | |||
68 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
69 | + if ((fd = get_dev_crypto()) < 0) | ||
70 | goto sw_try; | ||
71 | |||
72 | memset(&kop, 0, sizeof kop); | ||
73 | -- | ||
74 | 2.3.5 | ||
75 | |||