aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch
diff options
context:
space:
mode:
authorEneas U de Queiroz <cote2004-github@yahoo.com>2018-10-24 11:25:00 -0300
committerHauke Mehrtens <hauke@hauke-m.de>2019-02-12 22:23:26 +0100
commitd872d00b2f7e31b98e11e83922d1aaefc270647e (patch)
tree70a74b004144e1a2d16c71b6d4aff626e085c498 /package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch
parentbe3892284ca77a69615351b106b8dfbadad728c4 (diff)
downloadupstream-d872d00b2f7e31b98e11e83922d1aaefc270647e.tar.gz
upstream-d872d00b2f7e31b98e11e83922d1aaefc270647e.tar.bz2
upstream-d872d00b2f7e31b98e11e83922d1aaefc270647e.zip
openssl: update to version 1.1.1a
This version adds the following functionality: * TLS 1.3 * AFALG engine support for hardware accelleration * x25519 ECC curve support * CRIME protection: disable use of compression by default * Support for ChaCha20 and Poly1305 Patches fixing bugs in the /dev/crypto engine were applied, from https://github.com/openssl/openssl/pull/7585 This increses the size of the ipk binray on MIPS32 by about 32%: old: 693.941 bin/packages/mips_24kc/base/libopenssl1.0.0_1.0.2q-2_mips_24kc.ipk 193.827 bin/packages/mips_24kc/base/openssl-util_1.0.2q-2_mips_24kc.ipk new: 912.493 bin/packages/mips_24kc/base/libopenssl1.1_1.1.1a-2_mips_24kc.ipk 239.316 bin/packages/mips_24kc/base/openssl-util_1.1.1a-2_mips_24kc.ipk Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Diffstat (limited to 'package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch')
-rw-r--r--package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch b/package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch
new file mode 100644
index 0000000000..2cfff604b9
--- /dev/null
+++ b/package/libs/openssl/patches/220-eng_devcrypto-fix-copy-of-unitilialized-digest.patch
@@ -0,0 +1,53 @@
+From 68b02a8ab798b7e916c8141a36ab69d7493fc707 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 14 Nov 2018 13:58:06 -0200
+Subject: [PATCH 3/7] eng_devcrypto: fix copy of unitilialized digest
+
+If the source ctx has not been initialized, don't initialize the copy
+either.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
+Reviewed-by: Richard Levitte <levitte@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/7585)
+
+(cherry picked from commit ae8183690fa53b978d4647563f5a521c4cafe94c)
+
+--- a/crypto/engine/eng_devcrypto.c
++++ b/crypto/engine/eng_devcrypto.c
+@@ -338,7 +338,8 @@ static int devcrypto_ciphers(ENGINE *e,
+
+ struct digest_ctx {
+ struct session_op sess;
+- int init;
++ /* This signals that the init function was called, not that it succeeded. */
++ int init_called;
+ };
+
+ static const struct digest_data_st {
+@@ -403,7 +404,7 @@ static int digest_init(EVP_MD_CTX *ctx)
+ const struct digest_data_st *digest_d =
+ get_digest_data(EVP_MD_CTX_type(ctx));
+
+- digest_ctx->init = 1;
++ digest_ctx->init_called = 1;
+
+ memset(&digest_ctx->sess, 0, sizeof(digest_ctx->sess));
+ digest_ctx->sess.mac = digest_d->devcryptoid;
+@@ -476,14 +477,9 @@ static int digest_copy(EVP_MD_CTX *to, c
+ (struct digest_ctx *)EVP_MD_CTX_md_data(to);
+ struct cphash_op cphash;
+
+- if (digest_from == NULL)
++ if (digest_from == NULL || digest_from->init_called != 1)
+ return 1;
+
+- if (digest_from->init != 1) {
+- SYSerr(SYS_F_IOCTL, EINVAL);
+- return 0;
+- }
+-
+ if (!digest_init(to)) {
+ SYSerr(SYS_F_IOCTL, errno);
+ return 0;