summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch26
1 files changed, 13 insertions, 13 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch
index d5907892..a5c0f6db 100644
--- a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch
+++ b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch
@@ -1,4 +1,4 @@
1From e7c630f8417b6f4e1bf2466e545ffe04af2eff00 Mon Sep 17 00:00:00 2001 1From 305ab3fd8a8620fd11f7aef7e42170ba205040a9 Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@freescale.com> 2From: Cristian Stoica <cristian.stoica@freescale.com>
3Date: Thu, 29 Aug 2013 16:51:18 +0300 3Date: Thu, 29 Aug 2013 16:51:18 +0300
4Subject: [PATCH 02/48] eng_cryptodev: add support for TLS algorithms offload 4Subject: [PATCH 02/48] eng_cryptodev: add support for TLS algorithms offload
@@ -15,10 +15,10 @@ Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
15 1 file changed, 215 insertions(+), 11 deletions(-) 15 1 file changed, 215 insertions(+), 11 deletions(-)
16 16
17diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c 17diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
18index 8fb9c33..4d783d4 100644 18index 2a2b95c..d4da7fb 100644
19--- a/crypto/engine/eng_cryptodev.c 19--- a/crypto/engine/eng_cryptodev.c
20+++ b/crypto/engine/eng_cryptodev.c 20+++ b/crypto/engine/eng_cryptodev.c
21@@ -71,6 +71,9 @@ void ENGINE_load_cryptodev(void) 21@@ -72,6 +72,9 @@ void ENGINE_load_cryptodev(void)
22 struct dev_crypto_state { 22 struct dev_crypto_state {
23 struct session_op d_sess; 23 struct session_op d_sess;
24 int d_fd; 24 int d_fd;
@@ -28,7 +28,7 @@ index 8fb9c33..4d783d4 100644
28 # ifdef USE_CRYPTODEV_DIGESTS 28 # ifdef USE_CRYPTODEV_DIGESTS
29 char dummy_mac_key[HASH_MAX_LEN]; 29 char dummy_mac_key[HASH_MAX_LEN];
30 unsigned char digest_res[HASH_MAX_LEN]; 30 unsigned char digest_res[HASH_MAX_LEN];
31@@ -141,24 +144,25 @@ static struct { 31@@ -142,24 +145,25 @@ static struct {
32 int nid; 32 int nid;
33 int ivmax; 33 int ivmax;
34 int keylen; 34 int keylen;
@@ -60,7 +60,7 @@ index 8fb9c33..4d783d4 100644
60 }, 60 },
61 # ifdef CRYPTO_AES_CTR 61 # ifdef CRYPTO_AES_CTR
62 { 62 {
63@@ -172,16 +176,22 @@ static struct { 63@@ -173,16 +177,22 @@ static struct {
64 }, 64 },
65 # endif 65 # endif
66 { 66 {
@@ -87,7 +87,7 @@ index 8fb9c33..4d783d4 100644
87 }, 87 },
88 }; 88 };
89 89
90@@ -295,13 +305,15 @@ static int get_cryptodev_ciphers(const int **cnids) 90@@ -296,13 +306,15 @@ static int get_cryptodev_ciphers(const int **cnids)
91 } 91 }
92 memset(&sess, 0, sizeof(sess)); 92 memset(&sess, 0, sizeof(sess));
93 sess.key = (caddr_t) "123456789abcdefghijklmno"; 93 sess.key = (caddr_t) "123456789abcdefghijklmno";
@@ -104,7 +104,7 @@ index 8fb9c33..4d783d4 100644
104 if (ioctl(fd, CIOCGSESSION, &sess) != -1 && 104 if (ioctl(fd, CIOCGSESSION, &sess) != -1 &&
105 ioctl(fd, CIOCFSESSION, &sess.ses) != -1) 105 ioctl(fd, CIOCFSESSION, &sess.ses) != -1)
106 nids[count++] = ciphers[i].nid; 106 nids[count++] = ciphers[i].nid;
107@@ -457,6 +469,66 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 107@@ -458,6 +470,66 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
108 return (1); 108 return (1);
109 } 109 }
110 110
@@ -171,7 +171,7 @@ index 8fb9c33..4d783d4 100644
171 static int 171 static int
172 cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 172 cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
173 const unsigned char *iv, int enc) 173 const unsigned char *iv, int enc)
174@@ -496,6 +568,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 174@@ -497,6 +569,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
175 } 175 }
176 176
177 /* 177 /*
@@ -217,7 +217,7 @@ index 8fb9c33..4d783d4 100644
217 * free anything we allocated earlier when initting a 217 * free anything we allocated earlier when initting a
218 * session, and close the session. 218 * session, and close the session.
219 */ 219 */
220@@ -529,6 +640,63 @@ static int cryptodev_cleanup(EVP_CIPHER_CTX *ctx) 220@@ -530,6 +641,63 @@ static int cryptodev_cleanup(EVP_CIPHER_CTX *ctx)
221 return (ret); 221 return (ret);
222 } 222 }
223 223
@@ -281,7 +281,7 @@ index 8fb9c33..4d783d4 100644
281 /* 281 /*
282 * libcrypto EVP stuff - this is how we get wired to EVP so the engine 282 * libcrypto EVP stuff - this is how we get wired to EVP so the engine
283 * gets called when libcrypto requests a cipher NID. 283 * gets called when libcrypto requests a cipher NID.
284@@ -641,6 +809,34 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { 284@@ -642,6 +810,34 @@ const EVP_CIPHER cryptodev_aes_256_cbc = {
285 NULL 285 NULL
286 }; 286 };
287 287
@@ -316,7 +316,7 @@ index 8fb9c33..4d783d4 100644
316 # ifdef CRYPTO_AES_CTR 316 # ifdef CRYPTO_AES_CTR
317 const EVP_CIPHER cryptodev_aes_ctr = { 317 const EVP_CIPHER cryptodev_aes_ctr = {
318 NID_aes_128_ctr, 318 NID_aes_128_ctr,
319@@ -729,6 +925,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, 319@@ -730,6 +926,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
320 *cipher = &cryptodev_aes_ctr_256; 320 *cipher = &cryptodev_aes_ctr_256;
321 break; 321 break;
322 # endif 322 # endif
@@ -329,7 +329,7 @@ index 8fb9c33..4d783d4 100644
329 default: 329 default:
330 *cipher = NULL; 330 *cipher = NULL;
331 break; 331 break;
332@@ -1472,6 +1674,8 @@ void ENGINE_load_cryptodev(void) 332@@ -1485,6 +1687,8 @@ void ENGINE_load_cryptodev(void)
333 } 333 }
334 put_dev_crypto(fd); 334 put_dev_crypto(fd);
335 335
@@ -339,5 +339,5 @@ index 8fb9c33..4d783d4 100644
339 !ENGINE_set_name(engine, "BSD cryptodev engine") || 339 !ENGINE_set_name(engine, "BSD cryptodev engine") ||
340 !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || 340 !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) ||
341-- 341--
3422.7.0 3422.7.3
343 343