1 # |
|
2 # Engine t4 patch openssl-1.0.0d-t4-engine.sparc-patch. |
|
3 # This engine is SPARC-only. |
|
4 # |
|
5 Index: Configure |
|
6 =================================================================== |
|
7 diff -ru openssl-1.0.0d/Configure openssl-1.0.0d/Configure |
|
8 --- openssl-1.0.0d/Configure 2011-05-24 17:02:24.000000000 -0700 |
|
9 +++ openssl-1.0.0d/Configure 2011-07-27 10:48:17.817470000 -0700 |
|
10 @@ -135,8 +135,9 @@ |
|
11 |
|
12 my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o modexp512-x86_64.o::aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o rc4-md5-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:ghash-x86_64.o:"; |
|
13 my $ia64_asm="ia64cpuid.o:bn-ia64.o ia64-mont.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::ghash-ia64.o::void"; |
|
14 -my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o:aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o::md5-sparcv9.o:sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o:::::::ghash-sparcv9.o::void"; |
|
15 -my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::::void"; |
|
16 +my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o t4_des.o:aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o::md5-sparcv9.o t4_md5.o:sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o t4_sha1.o t4_sha2.o:::::::ghash-sparcv9.o::void"; |
|
17 +my $sparcv9_fips_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o:des_enc-sparc.o fcrypt_b.o t4_des.o:aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o::md5-sparcv9.o t4_md5.o:sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o t4_sha1.o t4_sha2.o:::::::ghash-sparcv9.o::void"; |
|
18 +my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o t4_des.o:t4_aes.o::t4_md5.o:t4_sha1.o t4_sha2.o:::::::void"; |
|
19 my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o:::::sha1-alpha.o:::::::ghash-alpha.o::void"; |
|
20 my $mips32_asm=":bn-mips.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o::::::::"; |
|
21 my $mips64_asm=":bn-mips.o mips-mont.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o sha512-mips.o::::::::"; |
|
22 @@ -264,9 +264,11 @@ |
|
23 # |
|
24 "solaris64-x86_64-cc-sunw","cc:-xO3 -m64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -lc:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR DES_PTR DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-KPIC:-m64 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign -M/usr/lib/ld/map.noexdata:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
|
25 # |
|
26 -"solaris-sparcv9-cc-sunw","cc:-xtarget=ultra -m32 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc:BN_LLONG RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-m32 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
|
27 +"solaris-sparcv9-cc-sunw","cc:-xtarget=ultra -m32 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc -lsoftcrypto:BN_LLONG RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-m32 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
|
28 +"solaris-sparcv9-cc-sunw-fips","cc:-xtarget=ultra -m32 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc -lsoftcrypto:BN_LLONG RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_fips_asm}:dlfcn:solaris-shared:-KPIC:-m32 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", |
|
29 # |
|
30 -"solaris64-sparcv9-cc-sunw","cc:-xtarget=ultra -m64 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -xspace -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc:BN_LLONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-m64 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/bin/ar rs::/64", |
|
31 +"solaris64-sparcv9-cc-sunw","cc:-xtarget=ultra -m64 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -xspace -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc -lsoftcrypto:BN_LLONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-m64 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/bin/ar rs::/64", |
|
32 +"solaris64-sparcv9-cc-sunw-fips","cc:-xtarget=ultra -m64 -Qoption cg -xregs=no%appl -xO5 -xstrconst -xdepend -xspace -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -lc -lsoftcrypto:BN_LLONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_fips_asm}:dlfcn:solaris-shared:-KPIC:-m64 -G -dy -z text -zdefs -Bdirect -zignore -M/usr/lib/ld/map.pagealign:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/bin/ar rs::/64", |
|
33 # Option -xF=%all instructs the compiler to place functions and data |
|
34 # variables into separate section fragments. This enables the link editor |
|
35 # to discard unused sections and files when linking wanboot-openssl.o |
|
36 Index: crypto/aes/Makefile |
|
37 =================================================================== |
|
38 diff -ru openssl-1.0.0d/crypto/aes/ openssl-1.0.0d/crypto/aes/Makefile |
|
39 --- openssl-1.0.0d/crypto/aes/Makefile 2011-05-24 17:03:31.000000000 -0700 |
|
40 +++ openssl-1.0.0d/crypto/aes/Makefile 2011-06-30 17:26:34.980110000 -0700 |
|
41 @@ -17,6 +17,10 @@ |
|
42 ASFLAGS= $(INCLUDES) $(ASFLAG) |
|
43 AFLAGS= $(ASFLAGS) |
|
44 |
|
45 +BITS:= $(shell if grep '^SHARED_LDFLAGS.*=.*-m32' ../../Makefile >/dev/null; \ |
|
46 + then echo 32; else echo 64; fi) |
|
47 +ASFLAGSYF= -xregsym=no -K pic -P -xarch=v9v -D_sparcv9 -D_ASM -Dsparc -m$(BITS) |
|
48 + |
|
49 GENERAL=Makefile |
|
50 #TEST=aestest.c |
|
51 TEST= |
|
52 @@ -72,6 +76,10 @@ |
|
53 aest4-sparcv9.s: asm/aest4-sparcv9.pl |
|
54 $(PERL) asm/aest4-sparcv9.pl $(CFLAGS) > $@ |
|
55 |
|
56 +t4_aes.o: asm/t4_aes.S |
|
57 + as $(ASFLAGSYF) -o $@ asm/t4_aes.S |
|
58 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
59 + |
|
60 aes-ppc.s: asm/aes-ppc.pl |
|
61 $(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@ |
|
62 |
|
63 Index: crypto/des/Makefile |
|
64 =================================================================== |
|
65 diff -ru openssl-1.0.0d/crypto/des/ openssl-1.0.0d/crypto/des/Makefile |
|
66 --- openssl-1.0.0d/crypto/des/Makefile 2011-07-26 17:47:28.530315349 -0700 |
|
67 +++ openssl-1.0.0d/crypto/des/Makefile 2011-07-27 10:41:47.362058958 -0700 |
|
68 @@ -17,6 +17,10 @@ |
|
69 ASFLAGS= $(INCLUDES) $(ASFLAG) |
|
70 AFLAGS= $(ASFLAGS) |
|
71 |
|
72 +BITS:= $(shell if grep '^SHARED_LDFLAGS.*=.*-m32' ../../Makefile >/dev/null; \ |
|
73 + then echo 32; else echo 64; fi) |
|
74 +ASFLAGSYF= -xregsym=no -K pic -P -xarch=v9v -D_sparcv9 -D_ASM -Dsparc -m$(BITS) |
|
75 + |
|
76 GENERAL=Makefile |
|
77 TEST=destest.c |
|
78 APPS= |
|
79 @@ -61,6 +65,10 @@ |
|
80 |
|
81 des_enc-sparc.S: asm/des_enc.m4 |
|
82 m4 -B 8192 asm/des_enc.m4 > des_enc-sparc.S |
|
83 + |
|
84 +t4_des.o: asm/t4_des.S |
|
85 + as $(ASFLAGSYF) -o $@ asm/t4_des.S |
|
86 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
87 |
|
88 des-586.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl |
|
89 $(PERL) asm/des-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@ |
|
90 Index: crypto/engine/Makefile |
|
91 =================================================================== |
|
92 diff -ru openssl-1.0.0d/crypto/engine/Makefile openssl-1.0.0d/crypto/engine/Makefile |
|
93 --- openssl-1.0.0d/crypto/engine/Makefile 2011-05-24 17:04:12.000000000 -0700 |
|
94 +++ openssl-1.0.0d/crypto/engine/Makefile 2011-07-28 10:10:00.000000000 -0700 |
|
95 @@ -22,12 +22,16 @@ |
|
96 tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \ |
|
97 tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \ |
|
98 eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \ |
|
99 + eng_t4.c eng_t4_des.c eng_t4_md5.c \ |
|
100 + eng_t4_sha1.c eng_t4_sha256.c eng_t4_sha512.c eng_t4_montmul.c \ |
|
101 eng_rsax.c eng_rdrand.c hw_pk11.c hw_pk11_pub.c hw_pk11_uri.c |
|
102 LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ |
|
103 eng_table.o eng_pkey.o eng_fat.o eng_all.o \ |
|
104 tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \ |
|
105 tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o \ |
|
106 eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o \ |
|
107 + eng_t4.o eng_t4_des.o eng_t4_md5.o \ |
|
108 + eng_t4_sha1.o eng_t4_sha256.o eng_t4_sha512.o eng_t4_montmul.o \ |
|
109 eng_rsax.o eng_rdrand.o hw_pk11.o hw_pk11_pub.o hw_pk11_uri.o |
|
110 |
|
111 SRC= $(LIBSRC) |
|
112 Index: crypto/engine/eng_all.c |
|
113 =================================================================== |
|
114 diff -ru openssl-1.0.0d/crypto/engine/eng_all.c openssl-1.0.0d/crypto/engine/eng_all.c |
|
115 --- openssl-1.0.0d/crypto/engine/eng_all.c 2011-05-24 17:02:20.000000000 -0700 |
|
116 +++ openssl-1.0.0d/crypto/engine/eng_all.c 2011-06-22 17:34:25.145829355 -0700 |
|
117 @@ -79,6 +79,10 @@ |
|
118 #ifndef OPENSSL_NO_RDRAND |
|
119 ENGINE_load_rdrand(); |
|
120 #endif |
|
121 +#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_T4) |
|
122 + ENGINE_load_t4(); |
|
123 + ENGINE_register_all_complete(); |
|
124 +#endif |
|
125 ENGINE_load_dynamic(); |
|
126 #ifndef OPENSSL_NO_HW_PKCS11 |
|
127 ENGINE_load_pk11(); |
|
128 Index: crypto/engine/engine.h |
|
129 ================================================================== |
|
130 diff -ru openssl-1.0.0d/crypto/engine/engine.h openssl-1.0.0d/crypto/engine/engine.h |
|
131 --- openssl-1.0.0d/crypto/engine/engine.h 2011-05-24 17:02:20.000000000 -0700 |
|
132 +++ openssl-1.0.0d/crypto/engine/engine.h 2011-05-24 18:05:29.075766123 -0700 |
|
133 @@ -351,6 +351,7 @@ |
|
134 #endif |
|
135 #endif |
|
136 void ENGINE_load_cryptodev(void); |
|
137 +void ENGINE_load_t4(void); |
|
138 void ENGINE_load_pk11(void); |
|
139 void ENGINE_load_rsax(void); |
|
140 void ENGINE_load_rdrand(void); |
|
141 Index: crypto/md5/Makefile |
|
142 ================================================================== |
|
143 diff -ru openssl-1.0.0d/crypto/md5/Makefile openssl-1.0.0d/crypto/md5/Makefile |
|
144 --- openssl-1.0.0d/crypto/md5/Makefile 2011-05-24 17:03:14.000000000 -0700 |
|
145 +++ openssl-1.0.0d/crypto/md5/Makefile 2011-08-27 16:01:49.000000000 -0700 |
|
146 @@ -17,6 +17,10 @@ |
|
147 ASFLAGS= $(INCLUDES) $(ASFLAG) |
|
148 AFLAGS= $(ASFLAGS) |
|
149 |
|
150 +BITS:= $(shell if grep '^SHARED_LDFLAGS.*=.*-m32' ../../Makefile >/dev/null; \ |
|
151 + then echo 32; else echo 64; fi) |
|
152 +ASFLAGSYF= -xregsym=no -K pic -P -xarch=v9v -D_sparcv9 -D_ASM -Dsparc -m$(BITS) |
|
153 + |
|
154 GENERAL=Makefile |
|
155 TEST=md5test.c |
|
156 APPS= |
|
157 @@ -55,6 +59,10 @@ |
|
158 md5-sparcv9.S: asm/md5-sparcv9.pl |
|
159 $(PERL) asm/md5-sparcv9.pl $@ $(CFLAGS) |
|
160 |
|
161 +t4_md5.o: asm/t4_md5.S |
|
162 + as $(ASFLAGSYF) -o $@ asm/t4_md5.S |
|
163 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
164 + |
|
165 files: |
|
166 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
|
167 |
|
168 Index: crypto/sha/Makefile |
|
169 ================================================================== |
|
170 diff -ru openssl-1.0.0d/crypto/sha/Makefile openssl-1.0.0d/crypto/sha/Makefile |
|
171 --- openssl-1.0.0d/crypto/sha/Makefile 2011-05-24 17:03:18.000000000 -0700 |
|
172 +++ openssl-1.0.0d/crypto/sha/Makefile 2011-08-27 16:01:49.000000000 -0700 |
|
173 @@ -17,6 +17,10 @@ |
|
174 ASFLAGS= $(INCLUDES) $(ASFLAG) |
|
175 AFLAGS= $(ASFLAGS) |
|
176 |
|
177 +BITS:= $(shell if grep '^SHARED_LDFLAGS.*=.*-m32' ../../Makefile >/dev/null; \ |
|
178 + then echo 32; else echo 64; fi) |
|
179 +ASFLAGSYF= -xregsym=no -K pic -P -xarch=v9v -D_sparcv9 -D_ASM -Dsparc -m$(BITS) |
|
180 + |
|
181 GENERAL=Makefile |
|
182 TEST=shatest.c sha1test.c sha256t.c sha512t.c |
|
183 APPS= |
|
184 @@ -91,6 +95,14 @@ |
|
185 sha256-armv4.o: sha256-armv4.S |
|
186 sha512-armv4.o: sha512-armv4.S |
|
187 |
|
188 +t4_sha1.o: asm/t4_sha1.S |
|
189 + as $(ASFLAGSYF) -o $@ asm/t4_sha1.S |
|
190 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
191 + |
|
192 +t4_sha2.o: asm/t4_sha2.S |
|
193 + as $(ASFLAGSYF) -o $@ asm/t4_sha2.S |
|
194 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
195 + |
|
196 files: |
|
197 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
|
198 |
|
199 Index: util/libeay.num |
|
200 ================================================================== |
|
201 diff -ru openssl-1.0.0d/util/libeay.num openssl-1.0.0d/util/libeay.num |
|
202 --- openssl-1.0.0d/util/libeay.num 2010-07-25 09:56:06.000000000 -0700 |
|
203 +++ openssl-1.0.0d/util/libeay.num 2011-05-25 11:19:15.585211842 -0700 |
|
204 @@ -4179,6 +4179,7 @@ |
|
205 UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: |
|
206 UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: |
|
207 EVP_read_pw_string_min 4552 EXIST::FUNCTION: |
|
208 +ENGINE_load_t4 4553 EXIST::FUNCTION:ENGINE |
|
209 CRYPTO_cts128_encrypt 4553 EXIST::FUNCTION: |
|
210 CRYPTO_cts128_decrypt_block 4554 EXIST::FUNCTION: |
|
211 CRYPTO_cfb128_1_encrypt 4555 EXIST::FUNCTION: |
|