mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/openssl(-cryptodev) to 1.0.1-3
This commit is contained in:
parent
ed1a5550b3
commit
1b789c2cc8
4 changed files with 151 additions and 5 deletions
|
@ -30,13 +30,15 @@ source=("https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz"
|
|||
'fix-manpages.patch'
|
||||
'no-rpath.patch'
|
||||
'ca-dir.patch'
|
||||
'disable-tls12-client.patch')
|
||||
'disable-tls12-client.patch'
|
||||
'vpaes.patch')
|
||||
md5sums=('134f168bc2a8333f19f81d684841710b'
|
||||
'efbe93c11747fed52e60567819409d8a'
|
||||
'5bbc0655bda2af95bc8eb568963ce8ba'
|
||||
'dc78d3d06baffc16217519242ce92478'
|
||||
'3bf51be3a1bbd262be46dc619f92aa90'
|
||||
'365328e1fff7239777adcb50dc4edd42')
|
||||
'365328e1fff7239777adcb50dc4edd42'
|
||||
'55ad53e8ec3db1db6978af55e3ce1b5d')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$_pkgname-$_ver
|
||||
|
@ -58,6 +60,8 @@ build() {
|
|||
patch -p0 -i $srcdir/ca-dir.patch
|
||||
# workaround for PR#2771
|
||||
patch -p1 -i $srcdir/disable-tls12-client.patch
|
||||
# fix for PR#2775
|
||||
patch -p1 -i $srcdir/vpaes.patch
|
||||
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
|
||||
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
|
||||
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 \
|
||||
|
|
69
core/openssl-cryptodev/vpaes.patch
Normal file
69
core/openssl-cryptodev/vpaes.patch
Normal file
|
@ -0,0 +1,69 @@
|
|||
Index: openssl/crypto/aes/asm/vpaes-x86.pl
|
||||
RCS File: /v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86.pl,v
|
||||
rcsdiff -q -kk '-r1.5.4.4' '-r1.5.4.5' -u '/v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86.pl,v' 2>/dev/null
|
||||
--- vpaes-x86.pl 2011/12/15 22:20:26 1.5.4.4
|
||||
+++ vpaes-x86.pl 2012/03/31 16:55:18 1.5.4.5
|
||||
@@ -843,6 +843,8 @@
|
||||
&mov ($out,&wparam(1)); # out
|
||||
&mov ($round,&wparam(2)); # len
|
||||
&mov ($key,&wparam(3)); # key
|
||||
+ &sub ($round,16);
|
||||
+ &jc (&label("cbc_abort"));
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($const,&wparam(4)); # ivp
|
||||
&and ($base,-16);
|
||||
@@ -853,7 +855,6 @@
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&mov (&DWP(0,"esp"),$out); # save out
|
||||
- &sub ($round,16);
|
||||
&mov (&DWP(4,"esp"),$key) # save key
|
||||
&mov (&DWP(8,"esp"),$const); # save ivp
|
||||
&mov ($out,$round); # $out works as $len
|
||||
@@ -896,6 +897,7 @@
|
||||
&mov ($base,&DWP(8,"esp")); # restore ivp
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&movdqu (&QWP(0,$base),"xmm1"); # write IV
|
||||
+&set_label("cbc_abort");
|
||||
&function_end("${PREFIX}_cbc_encrypt");
|
||||
|
||||
&asm_finish();
|
||||
Index: openssl/crypto/aes/asm/vpaes-x86_64.pl
|
||||
RCS File: /v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86_64.pl,v
|
||||
rcsdiff -q -kk '-r1.4.4.2' '-r1.4.4.3' -u '/v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86_64.pl,v' 2>/dev/null
|
||||
--- vpaes-x86_64.pl 2011/11/14 21:01:17 1.4.4.2
|
||||
+++ vpaes-x86_64.pl 2012/03/31 16:55:18 1.4.4.3
|
||||
@@ -263,7 +263,7 @@
|
||||
pshufb %xmm2, %xmm4 # 4 = sbou
|
||||
pxor %xmm0, %xmm4 # 4 = sb1u + k
|
||||
movdqa 0x70(%r10), %xmm0 # 0 : sbot
|
||||
- movdqa .Lk_sr-.Lk_dsbd(%r11), %xmm2
|
||||
+ movdqa -0x160(%r11), %xmm2 # .Lk_sr-.Lk_dsbd=-0x160
|
||||
pshufb %xmm3, %xmm0 # 0 = sb1t
|
||||
pxor %xmm4, %xmm0 # 0 = A
|
||||
pshufb %xmm2, %xmm0
|
||||
@@ -869,6 +869,8 @@
|
||||
___
|
||||
($len,$key)=($key,$len);
|
||||
$code.=<<___;
|
||||
+ sub \$16,$len
|
||||
+ jc .Lcbc_abort
|
||||
___
|
||||
$code.=<<___ if ($win64);
|
||||
lea -0xb8(%rsp),%rsp
|
||||
@@ -887,7 +889,6 @@
|
||||
$code.=<<___;
|
||||
movdqu ($ivp),%xmm6 # load IV
|
||||
sub $inp,$out
|
||||
- sub \$16,$len
|
||||
call _vpaes_preheat
|
||||
cmp \$0,${enc}d
|
||||
je .Lcbc_dec_loop
|
||||
@@ -932,6 +933,7 @@
|
||||
.Lcbc_epilogue:
|
||||
___
|
||||
$code.=<<___;
|
||||
+.Lcbc_abort:
|
||||
ret
|
||||
.size ${PREFIX}_cbc_encrypt,.-${PREFIX}_cbc_encrypt
|
||||
___
|
|
@ -11,7 +11,7 @@ _ver=1.0.1
|
|||
# use a pacman compatible version scheme
|
||||
#pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
|
||||
pkgver=$_ver
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.openssl.org'
|
||||
|
@ -25,13 +25,15 @@ source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"
|
|||
'fix-manpages.patch'
|
||||
'no-rpath.patch'
|
||||
'ca-dir.patch'
|
||||
'disable-tls12-client.patch')
|
||||
'disable-tls12-client.patch'
|
||||
'vpaes.patch')
|
||||
md5sums=('134f168bc2a8333f19f81d684841710b'
|
||||
'efbe93c11747fed52e60567819409d8a'
|
||||
'5bbc0655bda2af95bc8eb568963ce8ba'
|
||||
'dc78d3d06baffc16217519242ce92478'
|
||||
'3bf51be3a1bbd262be46dc619f92aa90'
|
||||
'26432b9d7af63c63828b6405c9185400')
|
||||
'26432b9d7af63c63828b6405c9185400'
|
||||
'55ad53e8ec3db1db6978af55e3ce1b5d')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname-$_ver
|
||||
|
@ -53,6 +55,8 @@ build() {
|
|||
patch -p0 -i $srcdir/ca-dir.patch
|
||||
# workaround for PR#2771
|
||||
patch -p1 -i $srcdir/disable-tls12-client.patch
|
||||
# fix for PR#2775
|
||||
patch -p1 -i $srcdir/vpaes.patch
|
||||
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
|
||||
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
|
||||
shared zlib enable-md2 \
|
||||
|
|
69
core/openssl/vpaes.patch
Normal file
69
core/openssl/vpaes.patch
Normal file
|
@ -0,0 +1,69 @@
|
|||
Index: openssl/crypto/aes/asm/vpaes-x86.pl
|
||||
RCS File: /v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86.pl,v
|
||||
rcsdiff -q -kk '-r1.5.4.4' '-r1.5.4.5' -u '/v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86.pl,v' 2>/dev/null
|
||||
--- vpaes-x86.pl 2011/12/15 22:20:26 1.5.4.4
|
||||
+++ vpaes-x86.pl 2012/03/31 16:55:18 1.5.4.5
|
||||
@@ -843,6 +843,8 @@
|
||||
&mov ($out,&wparam(1)); # out
|
||||
&mov ($round,&wparam(2)); # len
|
||||
&mov ($key,&wparam(3)); # key
|
||||
+ &sub ($round,16);
|
||||
+ &jc (&label("cbc_abort"));
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($const,&wparam(4)); # ivp
|
||||
&and ($base,-16);
|
||||
@@ -853,7 +855,6 @@
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&mov (&DWP(0,"esp"),$out); # save out
|
||||
- &sub ($round,16);
|
||||
&mov (&DWP(4,"esp"),$key) # save key
|
||||
&mov (&DWP(8,"esp"),$const); # save ivp
|
||||
&mov ($out,$round); # $out works as $len
|
||||
@@ -896,6 +897,7 @@
|
||||
&mov ($base,&DWP(8,"esp")); # restore ivp
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&movdqu (&QWP(0,$base),"xmm1"); # write IV
|
||||
+&set_label("cbc_abort");
|
||||
&function_end("${PREFIX}_cbc_encrypt");
|
||||
|
||||
&asm_finish();
|
||||
Index: openssl/crypto/aes/asm/vpaes-x86_64.pl
|
||||
RCS File: /v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86_64.pl,v
|
||||
rcsdiff -q -kk '-r1.4.4.2' '-r1.4.4.3' -u '/v/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86_64.pl,v' 2>/dev/null
|
||||
--- vpaes-x86_64.pl 2011/11/14 21:01:17 1.4.4.2
|
||||
+++ vpaes-x86_64.pl 2012/03/31 16:55:18 1.4.4.3
|
||||
@@ -263,7 +263,7 @@
|
||||
pshufb %xmm2, %xmm4 # 4 = sbou
|
||||
pxor %xmm0, %xmm4 # 4 = sb1u + k
|
||||
movdqa 0x70(%r10), %xmm0 # 0 : sbot
|
||||
- movdqa .Lk_sr-.Lk_dsbd(%r11), %xmm2
|
||||
+ movdqa -0x160(%r11), %xmm2 # .Lk_sr-.Lk_dsbd=-0x160
|
||||
pshufb %xmm3, %xmm0 # 0 = sb1t
|
||||
pxor %xmm4, %xmm0 # 0 = A
|
||||
pshufb %xmm2, %xmm0
|
||||
@@ -869,6 +869,8 @@
|
||||
___
|
||||
($len,$key)=($key,$len);
|
||||
$code.=<<___;
|
||||
+ sub \$16,$len
|
||||
+ jc .Lcbc_abort
|
||||
___
|
||||
$code.=<<___ if ($win64);
|
||||
lea -0xb8(%rsp),%rsp
|
||||
@@ -887,7 +889,6 @@
|
||||
$code.=<<___;
|
||||
movdqu ($ivp),%xmm6 # load IV
|
||||
sub $inp,$out
|
||||
- sub \$16,$len
|
||||
call _vpaes_preheat
|
||||
cmp \$0,${enc}d
|
||||
je .Lcbc_dec_loop
|
||||
@@ -932,6 +933,7 @@
|
||||
.Lcbc_epilogue:
|
||||
___
|
||||
$code.=<<___;
|
||||
+.Lcbc_abort:
|
||||
ret
|
||||
.size ${PREFIX}_cbc_encrypt,.-${PREFIX}_cbc_encrypt
|
||||
___
|
Loading…
Reference in a new issue