aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-08-02 11:30:10 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-08-02 15:00:19 +0300
commit9927e2b168df05cb2bfaec72270576b20f6e4dd8 (patch)
tree2c4e077abb644ec244bfe40be11abcab29ed866d
parent9e86eac9ccecbceef248af531bf9773eca4e70b3 (diff)
downloadaports-9927e2b168df05cb2bfaec72270576b20f6e4dd8.tar.bz2
aports-9927e2b168df05cb2bfaec72270576b20f6e4dd8.tar.xz
main/openssl: fix padlock sha1/256 oneshot finalizing update
We want to handle bytes upto next block boundary, to work with hardware from block boundary. The code incorrectly fed just the amount of bytes in the block. (cherry picked from commit 8df1ba4a80de53f16456c0733d9bb12731e40829)
-rw-r--r--main/openssl/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch4
-rw-r--r--main/openssl/APKBUILD4
2 files changed, 4 insertions, 4 deletions
diff --git a/main/openssl/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch b/main/openssl/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
index d1bb3704b7..1ace35936f 100644
--- a/main/openssl/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
+++ b/main/openssl/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
@@ -298,7 +298,7 @@ index 4300f35..3591c59 100644
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ if (c->num != 0) {
-+ l = (len < SHA_CBLOCK) ? len : SHA_CBLOCK;
++ l = (len < SHA_CBLOCK - c->num) ? len : (SHA_CBLOCK - c->num);
+ if (!SHA1_Update(c, data, l))
+ return 0;
+ p += l;
@@ -489,7 +489,7 @@ index 4300f35..3591c59 100644
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ if (c->num != 0) {
-+ l = (len < SHA256_CBLOCK) ? len : SHA256_CBLOCK;
++ l = (len < SHA256_CBLOCK - c->num) ? len : (SHA256_CBLOCK - c->num);
+ if (!SHA256_Update(c, data, l))
+ return 0;
+ p += l;
diff --git a/main/openssl/APKBUILD b/main/openssl/APKBUILD
index a3e4cf5fb2..76052c86de 100644
--- a/main/openssl/APKBUILD
+++ b/main/openssl/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openssl
pkgver=1.0.0j
-pkgrel=0
+pkgrel=1
pkgdesc="Toolkit for SSL v2/v3 and TLS v1"
url="http://openssl.org"
depends=
@@ -75,5 +75,5 @@ c6a9857a5dbd30cead0404aa7dd73977 openssl-bb-basename.patch
1f607b8e11347e56a0906756f3d6928a 0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
16424fe5fb494804559f01c7ec7e64f4 0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
53fbd01733b488717575e04a5aaf6664 0003-engines-e_padlock-backport-cvs-head-changes.patch
-beea8819faeefb9ab19ef90f00c53782 0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
+c0dae72e29e8fdfb753906411b1722bc 0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
8bc7a427f6005158585386b9837f700c 0005-crypto-engine-autoload-padlock-dynamic-engine.patch"