aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssl
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 11:34:39 +0300
commit70f1e866bf8ad78cff14ad5e96c489469d532c36 (patch)
treeb8ee0df625cf3462b82222de77cf7d905d57fcd2 /main/openssl
parent4ecda1eeb24bee90b13fb2c4a3ddac458c22ffd1 (diff)
downloadaports-70f1e866bf8ad78cff14ad5e96c489469d532c36.tar.bz2
aports-70f1e866bf8ad78cff14ad5e96c489469d532c36.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.
Diffstat (limited to 'main/openssl')
-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 aedafa4930..04664654f5 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.1c
-pkgrel=0
+pkgrel=1
pkgdesc="Toolkit for SSL v2/v3 and TLS v1"
url="http://openssl.org"
depends=
@@ -73,5 +73,5 @@ md5sums="ae412727c8c15b67880aef7bd2999b2e openssl-1.0.1c.tar.gz
c6a9857a5dbd30cead0404aa7dd73977 openssl-bb-basename.patch
1f607b8e11347e56a0906756f3d6928a 0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.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
7820941f69acf58f05cccb33faf4ee70 0005-crypto-engine-autoload-padlock-dynamic-engine.patch"