Skip to content

Commit 533881f

Browse files
author
Shigeki Ohtsu
committed
deps: upgrade openssl sources to 1.0.2e
This just replaces all sources of openssl-1.0.2e.tar.gz into deps/openssl/openssl deps: copy all openssl header files to include dir All symlink files in `deps/openssl/openssl/include/openssl/` are removed and replaced with real header files to avoid issues on Windows. Two files of opensslconf.h in crypto and include dir are replaced to refer config/opensslconf.h. deps: fix openssl assembly error on ia32 win32 `x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and perhaps others) are requiring .686 . deps: fix asm build error of openssl in x86_win32 See https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html node needs to stop using masm and move to nasm or yasm on Win32. openssl: fix keypress requirement in apps on win32 Reapply b910613 . deps: add -no_rand_screen to openssl s_client In openssl s_client on Windows, RAND_screen() is invoked to initialize random state but it takes several seconds in each connection. This added -no_rand_screen to openssl s_client on Windows to skip RAND_screen() and gets a better performance in the unit test of test-tls-server-verify. Do not enable this except to use in the unit test. deps: update openssl config files Regenrate config files for supported platforms with Makefile. deps: update openssl asm and asm_obsolete files Regenerate asm files with Makefile and CC=gcc and ASM=gcc where gcc-4.8.4. Also asm files in asm_obsolete dir to support old compiler and assmebler are regenerated without CC and ASM envs. PR-URL: #4134 Reviewed-By: Fedor Indutny <[email protected]>
1 parent 3b69060 commit 533881f

File tree

357 files changed

+2887
-4847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+2887
-4847
lines changed

deps/openssl/asm/arm-void-gas/bn/armv4-gf2m.S

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ bn_GF2m_mul_2x2:
9898
mov r12,#7<<2
9999
sub sp,sp,#32 @ allocate tab[8]
100100

101-
bl mul_1x1_ialu @ a1·b1
101+
bl mul_1x1_ialu @ a1·b1
102102
str r5,[r10,#8]
103103
str r4,[r10,#12]
104104

@@ -108,13 +108,13 @@ bn_GF2m_mul_2x2:
108108
eor r2,r2,r1
109109
eor r0,r0,r3
110110
eor r1,r1,r2
111-
bl mul_1x1_ialu @ a0·b0
111+
bl mul_1x1_ialu @ a0·b0
112112
str r5,[r10]
113113
str r4,[r10,#4]
114114

115115
eor r1,r1,r2
116116
eor r0,r0,r3
117-
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
117+
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
118118
ldmia r10,{r6-r9}
119119
eor r5,r5,r4
120120
eor r4,r4,r7

deps/openssl/asm/arm-void-gas/modes/ghash-armv4.S

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
.text
44
.code 32
55

6+
#ifdef __clang__
7+
#define ldrplb ldrbpl
8+
#define ldrneb ldrbne
9+
#endif
10+
611
.type rem_4bit,%object
712
.align 5
813
rem_4bit:

deps/openssl/asm/arm-void-gas/modes/ghashv8-armx.S

+11-11
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ gcm_gmult_v8:
6666
#endif
6767
vext.8 q3,q9,q9,#8
6868

69-
.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
69+
.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
7070
veor q9,q9,q3 @ Karatsuba pre-processing
71-
.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi
72-
.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi)
71+
.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi
72+
.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi)
7373

7474
vext.8 q9,q0,q2,#8 @ Karatsuba post-processing
7575
veor q10,q0,q2
@@ -134,7 +134,7 @@ gcm_ghash_v8:
134134
#endif
135135
vext.8 q7,q9,q9,#8
136136
veor q3,q3,q0 @ I[i]^=Xi
137-
.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1
137+
.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1
138138
veor q9,q9,q7 @ Karatsuba pre-processing
139139
.byte 0x8f,0xce,0xa9,0xf2 @ pmull2 q6,q12,q7
140140
b .Loop_mod2x_v8
@@ -143,14 +143,14 @@ gcm_ghash_v8:
143143
.Loop_mod2x_v8:
144144
vext.8 q10,q3,q3,#8
145145
subs r3,r3,#32 @ is there more data?
146-
.byte 0x86,0x0e,0xac,0xf2 @ pmull q0,q14,q3 @ H^2.lo·Xi.lo
146+
.byte 0x86,0x0e,0xac,0xf2 @ pmull q0,q14,q3 @ H^2.lo·Xi.lo
147147
movlo r12,#0 @ is it time to zero r12?
148148

149149
.byte 0xa2,0xae,0xaa,0xf2 @ pmull q5,q13,q9
150150
veor q10,q10,q3 @ Karatsuba pre-processing
151-
.byte 0x87,0x4e,0xad,0xf2 @ pmull2 q2,q14,q3 @ H^2.hi·Xi.hi
151+
.byte 0x87,0x4e,0xad,0xf2 @ pmull2 q2,q14,q3 @ H^2.hi·Xi.hi
152152
veor q0,q0,q4 @ accumulate
153-
.byte 0xa5,0x2e,0xab,0xf2 @ pmull2 q1,q13,q10 @ (H^2.lo+H^2.hi)·(Xi.lo+Xi.hi)
153+
.byte 0xa5,0x2e,0xab,0xf2 @ pmull2 q1,q13,q10 @ (H^2.lo+H^2.hi)·(Xi.lo+Xi.hi)
154154
vld1.64 {q8},[r2],r12 @ load [rotated] I[i+2]
155155

156156
veor q2,q2,q6
@@ -175,7 +175,7 @@ gcm_ghash_v8:
175175
vext.8 q7,q9,q9,#8
176176
vext.8 q3,q8,q8,#8
177177
veor q0,q1,q10
178-
.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1
178+
.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1
179179
veor q3,q3,q2 @ accumulate q3 early
180180

181181
vext.8 q10,q0,q0,#8 @ 2nd phase of reduction
@@ -196,10 +196,10 @@ gcm_ghash_v8:
196196
veor q3,q3,q0 @ inp^=Xi
197197
veor q9,q8,q10 @ q9 is rotated inp^Xi
198198

199-
.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
199+
.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
200200
veor q9,q9,q3 @ Karatsuba pre-processing
201-
.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi
202-
.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi)
201+
.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi
202+
.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi)
203203

204204
vext.8 q9,q0,q2,#8 @ Karatsuba post-processing
205205
veor q10,q0,q2

deps/openssl/asm/arm64-linux64-gas/modes/ghashv8-armx.S

+11-11
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ gcm_gmult_v8:
6565
#endif
6666
ext v3.16b,v17.16b,v17.16b,#8
6767

68-
pmull v0.1q,v20.1d,v3.1d //H.loˇXi.lo
68+
pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo
6969
eor v17.16b,v17.16b,v3.16b //Karatsuba pre-processing
70-
pmull2 v2.1q,v20.2d,v3.2d //H.hiˇXi.hi
71-
pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)ˇ(Xi.lo+Xi.hi)
70+
pmull2 v2.1q,v20.2d,v3.2d //H.hi·Xi.hi
71+
pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)·(Xi.lo+Xi.hi)
7272

7373
ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing
7474
eor v18.16b,v0.16b,v2.16b
@@ -132,7 +132,7 @@ gcm_ghash_v8:
132132
#endif
133133
ext v7.16b,v17.16b,v17.16b,#8
134134
eor v3.16b,v3.16b,v0.16b //I[i]^=Xi
135-
pmull v4.1q,v20.1d,v7.1d //HˇIi+1
135+
pmull v4.1q,v20.1d,v7.1d //H·Ii+1
136136
eor v17.16b,v17.16b,v7.16b //Karatsuba pre-processing
137137
pmull2 v6.1q,v20.2d,v7.2d
138138
b .Loop_mod2x_v8
@@ -141,14 +141,14 @@ gcm_ghash_v8:
141141
.Loop_mod2x_v8:
142142
ext v18.16b,v3.16b,v3.16b,#8
143143
subs x3,x3,#32 //is there more data?
144-
pmull v0.1q,v22.1d,v3.1d //H^2.loˇXi.lo
144+
pmull v0.1q,v22.1d,v3.1d //H^2.lo·Xi.lo
145145
csel x12,xzr,x12,lo //is it time to zero x12?
146146

147147
pmull v5.1q,v21.1d,v17.1d
148148
eor v18.16b,v18.16b,v3.16b //Karatsuba pre-processing
149-
pmull2 v2.1q,v22.2d,v3.2d //H^2.hiˇXi.hi
149+
pmull2 v2.1q,v22.2d,v3.2d //H^2.hi·Xi.hi
150150
eor v0.16b,v0.16b,v4.16b //accumulate
151-
pmull2 v1.1q,v21.2d,v18.2d //(H^2.lo+H^2.hi)ˇ(Xi.lo+Xi.hi)
151+
pmull2 v1.1q,v21.2d,v18.2d //(H^2.lo+H^2.hi)·(Xi.lo+Xi.hi)
152152
ld1 {v16.2d},[x2],x12 //load [rotated] I[i+2]
153153

154154
eor v2.16b,v2.16b,v6.16b
@@ -173,7 +173,7 @@ gcm_ghash_v8:
173173
ext v7.16b,v17.16b,v17.16b,#8
174174
ext v3.16b,v16.16b,v16.16b,#8
175175
eor v0.16b,v1.16b,v18.16b
176-
pmull v4.1q,v20.1d,v7.1d //HˇIi+1
176+
pmull v4.1q,v20.1d,v7.1d //H·Ii+1
177177
eor v3.16b,v3.16b,v2.16b //accumulate v3.16b early
178178

179179
ext v18.16b,v0.16b,v0.16b,#8 //2nd phase of reduction
@@ -194,10 +194,10 @@ gcm_ghash_v8:
194194
eor v3.16b,v3.16b,v0.16b //inp^=Xi
195195
eor v17.16b,v16.16b,v18.16b //v17.16b is rotated inp^Xi
196196

197-
pmull v0.1q,v20.1d,v3.1d //H.loˇXi.lo
197+
pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo
198198
eor v17.16b,v17.16b,v3.16b //Karatsuba pre-processing
199-
pmull2 v2.1q,v20.2d,v3.2d //H.hiˇXi.hi
200-
pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)ˇ(Xi.lo+Xi.hi)
199+
pmull2 v2.1q,v20.2d,v3.2d //H.hi·Xi.hi
200+
pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)·(Xi.lo+Xi.hi)
201201

202202
ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing
203203
eor v18.16b,v0.16b,v2.16b

deps/openssl/asm/x64-elf-gas/aes/aesni-sha256-x86_64.s

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ aesni_cbc_sha256_enc:
2121
andl $296,%r11d
2222
cmpl $296,%r11d
2323
je aesni_cbc_sha256_enc_avx2
24-
andl $1073741824,%eax
25-
andl $268435968,%r10d
26-
orl %eax,%r10d
27-
cmpl $1342177792,%r10d
28-
je aesni_cbc_sha256_enc_avx
24+
andl $268435456,%r10d
25+
jnz aesni_cbc_sha256_enc_avx
2926
ud2
3027
xorl %eax,%eax
3128
cmpq $0,%rdi

deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s

+19-3
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,15 @@ sqr8x_reduction:
15651565
.align 32
15661566
.L8x_tail_done:
15671567
addq (%rdx),%r8
1568+
adcq $0,%r9
1569+
adcq $0,%r10
1570+
adcq $0,%r11
1571+
adcq $0,%r12
1572+
adcq $0,%r13
1573+
adcq $0,%r14
1574+
adcq $0,%r15
1575+
1576+
15681577
xorq %rax,%rax
15691578

15701579
negq %rsi
@@ -2806,6 +2815,15 @@ sqrx8x_reduction:
28062815
.align 32
28072816
.Lsqrx8x_tail_done:
28082817
addq 24+8(%rsp),%r8
2818+
adcq $0,%r9
2819+
adcq $0,%r10
2820+
adcq $0,%r11
2821+
adcq $0,%r12
2822+
adcq $0,%r13
2823+
adcq $0,%r14
2824+
adcq $0,%r15
2825+
2826+
28092827
movq %rsi,%rax
28102828

28112829
subq 16+8(%rsp),%rsi
@@ -2839,13 +2857,11 @@ sqrx8x_reduction:
28392857
leaq 64(%rdi,%rcx,1),%rdi
28402858
cmpq 8+8(%rsp),%r8
28412859
jb .Lsqrx8x_reduction_loop
2842-
xorq %rbx,%rbx
2860+
xorl %ebx,%ebx
28432861
subq %r15,%rsi
28442862
adcq %rbx,%rbx
28452863
movq %rcx,%r10
2846-
.byte 0x67
28472864
orq %rbx,%rax
2848-
.byte 0x67
28492865
movq %rcx,%r9
28502866
xorq $1,%rax
28512867
sarq $3+2,%rcx

deps/openssl/asm/x64-macosx-gas/aes/aesni-sha256-x86_64.s

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ _aesni_cbc_sha256_enc:
2121
andl $296,%r11d
2222
cmpl $296,%r11d
2323
je aesni_cbc_sha256_enc_avx2
24-
andl $1073741824,%eax
25-
andl $268435968,%r10d
26-
orl %eax,%r10d
27-
cmpl $1342177792,%r10d
28-
je aesni_cbc_sha256_enc_avx
24+
andl $268435456,%r10d
25+
jnz aesni_cbc_sha256_enc_avx
2926
ud2
3027
xorl %eax,%eax
3128
cmpq $0,%rdi

deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s

+19-3
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,15 @@ L$8x_tail:
15651565
.p2align 5
15661566
L$8x_tail_done:
15671567
addq (%rdx),%r8
1568+
adcq $0,%r9
1569+
adcq $0,%r10
1570+
adcq $0,%r11
1571+
adcq $0,%r12
1572+
adcq $0,%r13
1573+
adcq $0,%r14
1574+
adcq $0,%r15
1575+
1576+
15681577
xorq %rax,%rax
15691578

15701579
negq %rsi
@@ -2806,6 +2815,15 @@ L$sqrx8x_tail:
28062815
.p2align 5
28072816
L$sqrx8x_tail_done:
28082817
addq 24+8(%rsp),%r8
2818+
adcq $0,%r9
2819+
adcq $0,%r10
2820+
adcq $0,%r11
2821+
adcq $0,%r12
2822+
adcq $0,%r13
2823+
adcq $0,%r14
2824+
adcq $0,%r15
2825+
2826+
28092827
movq %rsi,%rax
28102828

28112829
subq 16+8(%rsp),%rsi
@@ -2839,13 +2857,11 @@ L$sqrx8x_no_tail:
28392857
leaq 64(%rdi,%rcx,1),%rdi
28402858
cmpq 8+8(%rsp),%r8
28412859
jb L$sqrx8x_reduction_loop
2842-
xorq %rbx,%rbx
2860+
xorl %ebx,%ebx
28432861
subq %r15,%rsi
28442862
adcq %rbx,%rbx
28452863
movq %rcx,%r10
2846-
.byte 0x67
28472864
orq %rbx,%rax
2848-
.byte 0x67
28492865
movq %rcx,%r9
28502866
xorq $1,%rax
28512867
sarq $3+2,%rcx

deps/openssl/asm/x64-win32-masm/aes/aesni-sha256-x86_64.asm

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ aesni_cbc_sha256_enc PROC PUBLIC
2222
and r11d,296
2323
cmp r11d,296
2424
je aesni_cbc_sha256_enc_avx2
25-
and eax,1073741824
26-
and r10d,268435968
27-
or r10d,eax
28-
cmp r10d,1342177792
29-
je aesni_cbc_sha256_enc_avx
25+
and r10d,268435456
26+
jnz aesni_cbc_sha256_enc_avx
3027
ud2
3128
xor eax,eax
3229
cmp rcx,0

deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm

+19-3
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,15 @@ $L$8x_tail::
16241624
ALIGN 32
16251625
$L$8x_tail_done::
16261626
add r8,QWORD PTR[rdx]
1627+
adc r9,0
1628+
adc r10,0
1629+
adc r11,0
1630+
adc r12,0
1631+
adc r13,0
1632+
adc r14,0
1633+
adc r15,0
1634+
1635+
16271636
xor rax,rax
16281637

16291638
neg rsi
@@ -2923,6 +2932,15 @@ DB 0c4h,062h,0fbh,0f6h,0a5h,040h,000h,000h,000h
29232932
ALIGN 32
29242933
$L$sqrx8x_tail_done::
29252934
add r8,QWORD PTR[((24+8))+rsp]
2935+
adc r9,0
2936+
adc r10,0
2937+
adc r11,0
2938+
adc r12,0
2939+
adc r13,0
2940+
adc r14,0
2941+
adc r15,0
2942+
2943+
29262944
mov rax,rsi
29272945

29282946
sub rsi,QWORD PTR[((16+8))+rsp]
@@ -2956,13 +2974,11 @@ DB 102,72,15,126,213
29562974
lea rdi,QWORD PTR[64+rcx*1+rdi]
29572975
cmp r8,QWORD PTR[((8+8))+rsp]
29582976
jb $L$sqrx8x_reduction_loop
2959-
xor rbx,rbx
2977+
xor ebx,ebx
29602978
sub rsi,r15
29612979
adc rbx,rbx
29622980
mov r10,rcx
2963-
DB 067h
29642981
or rax,rbx
2965-
DB 067h
29662982
mov r9,rcx
29672983
xor rax,1
29682984
sar rcx,3+2

deps/openssl/asm_obsolete/arm-void-gas/bn/armv4-gf2m.S

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ bn_GF2m_mul_2x2:
9898
mov r12,#7<<2
9999
sub sp,sp,#32 @ allocate tab[8]
100100

101-
bl mul_1x1_ialu @ a1·b1
101+
bl mul_1x1_ialu @ a1·b1
102102
str r5,[r10,#8]
103103
str r4,[r10,#12]
104104

@@ -108,13 +108,13 @@ bn_GF2m_mul_2x2:
108108
eor r2,r2,r1
109109
eor r0,r0,r3
110110
eor r1,r1,r2
111-
bl mul_1x1_ialu @ a0·b0
111+
bl mul_1x1_ialu @ a0·b0
112112
str r5,[r10]
113113
str r4,[r10,#4]
114114

115115
eor r1,r1,r2
116116
eor r0,r0,r3
117-
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
117+
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
118118
ldmia r10,{r6-r9}
119119
eor r5,r5,r4
120120
eor r4,r4,r7

deps/openssl/asm_obsolete/arm-void-gas/modes/ghash-armv4.S

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
.text
44
.code 32
55

6+
#ifdef __clang__
7+
#define ldrplb ldrbpl
8+
#define ldrneb ldrbne
9+
#endif
10+
611
.type rem_4bit,%object
712
.align 5
813
rem_4bit:

0 commit comments

Comments
 (0)