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 dest4-sparcv9.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 dest4-sparcv9.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 dest4-sparcv9.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_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 aes-sparcv9.s: asm/aes-sparcv9.pl |
|
54 $(PERL) asm/aes-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/engine/Makefile |
|
64 =================================================================== |
|
65 diff -ru openssl-1.0.0d/crypto/engine/Makefile openssl-1.0.0d/crypto/engine/Makefile |
|
66 --- openssl-1.0.0d/crypto/engine/Makefile 2011-05-24 17:04:12.000000000 -0700 |
|
67 +++ openssl-1.0.0d/crypto/engine/Makefile 2011-07-28 10:10:00.000000000 -0700 |
|
68 @@ -22,12 +22,16 @@ |
|
69 tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \ |
|
70 tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \ |
|
71 eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \ |
|
72 + eng_t4.c eng_t4_md5.c \ |
|
73 + eng_t4_sha1.c eng_t4_sha256.c eng_t4_sha512.c eng_t4_montmul.c \ |
|
74 eng_rsax.c eng_rdrand.c hw_pk11.c hw_pk11_pub.c hw_pk11_uri.c |
|
75 LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ |
|
76 eng_table.o eng_pkey.o eng_fat.o eng_all.o \ |
|
77 tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \ |
|
78 tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o \ |
|
79 eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o \ |
|
80 + eng_t4.o eng_t4_md5.o \ |
|
81 + eng_t4_sha1.o eng_t4_sha256.o eng_t4_sha512.o eng_t4_montmul.o \ |
|
82 eng_rsax.o eng_rdrand.o hw_pk11.o hw_pk11_pub.o hw_pk11_uri.o |
|
83 |
|
84 SRC= $(LIBSRC) |
|
85 Index: crypto/engine/eng_all.c |
|
86 =================================================================== |
|
87 diff -ru openssl-1.0.0d/crypto/engine/eng_all.c openssl-1.0.0d/crypto/engine/eng_all.c |
|
88 --- openssl-1.0.0d/crypto/engine/eng_all.c 2011-05-24 17:02:20.000000000 -0700 |
|
89 +++ openssl-1.0.0d/crypto/engine/eng_all.c 2011-06-22 17:34:25.145829355 -0700 |
|
90 @@ -79,6 +79,10 @@ |
|
91 #ifndef OPENSSL_NO_RDRAND |
|
92 ENGINE_load_rdrand(); |
|
93 #endif |
|
94 +#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_T4) |
|
95 + ENGINE_load_t4(); |
|
96 + ENGINE_register_all_complete(); |
|
97 +#endif |
|
98 ENGINE_load_dynamic(); |
|
99 #ifndef OPENSSL_NO_HW_PKCS11 |
|
100 ENGINE_load_pk11(); |
|
101 Index: crypto/engine/engine.h |
|
102 ================================================================== |
|
103 diff -ru openssl-1.0.0d/crypto/engine/engine.h openssl-1.0.0d/crypto/engine/engine.h |
|
104 --- openssl-1.0.0d/crypto/engine/engine.h 2011-05-24 17:02:20.000000000 -0700 |
|
105 +++ openssl-1.0.0d/crypto/engine/engine.h 2011-05-24 18:05:29.075766123 -0700 |
|
106 @@ -351,6 +351,7 @@ |
|
107 #endif |
|
108 #endif |
|
109 void ENGINE_load_cryptodev(void); |
|
110 +void ENGINE_load_t4(void); |
|
111 void ENGINE_load_pk11(void); |
|
112 void ENGINE_load_rsax(void); |
|
113 void ENGINE_load_rdrand(void); |
|
114 Index: crypto/md5/Makefile |
|
115 ================================================================== |
|
116 diff -ru openssl-1.0.0d/crypto/md5/Makefile openssl-1.0.0d/crypto/md5/Makefile |
|
117 --- openssl-1.0.0d/crypto/md5/Makefile 2011-05-24 17:03:14.000000000 -0700 |
|
118 +++ openssl-1.0.0d/crypto/md5/Makefile 2011-08-27 16:01:49.000000000 -0700 |
|
119 @@ -17,6 +17,10 @@ |
|
120 ASFLAGS= $(INCLUDES) $(ASFLAG) |
|
121 AFLAGS= $(ASFLAGS) |
|
122 |
|
123 +BITS:= $(shell if grep '^SHARED_LDFLAGS.*=.*-m32' ../../Makefile >/dev/null; \ |
|
124 + then echo 32; else echo 64; fi) |
|
125 +ASFLAGSYF= -xregsym=no -K pic -P -xarch=v9v -D_sparcv9 -D_ASM -Dsparc -m$(BITS) |
|
126 + |
|
127 GENERAL=Makefile |
|
128 TEST=md5test.c |
|
129 APPS= |
|
130 @@ -55,6 +59,10 @@ |
|
131 md5-sparcv9.S: asm/md5-sparcv9.pl |
|
132 $(PERL) asm/md5-sparcv9.pl $@ $(CFLAGS) |
|
133 |
|
134 +t4_md5.o: asm/t4_md5.S |
|
135 + as $(ASFLAGSYF) -o $@ asm/t4_md5.S |
|
136 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
137 + |
|
138 files: |
|
139 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
|
140 |
|
141 Index: crypto/sha/Makefile |
|
142 ================================================================== |
|
143 diff -ru openssl-1.0.0d/crypto/sha/Makefile openssl-1.0.0d/crypto/sha/Makefile |
|
144 --- openssl-1.0.0d/crypto/sha/Makefile 2011-05-24 17:03:18.000000000 -0700 |
|
145 +++ openssl-1.0.0d/crypto/sha/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=shatest.c sha1test.c sha256t.c sha512t.c |
|
156 APPS= |
|
157 @@ -91,6 +95,14 @@ |
|
158 sha256-armv4.o: sha256-armv4.S |
|
159 sha512-armv4.o: sha512-armv4.S |
|
160 |
|
161 +t4_sha1.o: asm/t4_sha1.S |
|
162 + as $(ASFLAGSYF) -o $@ asm/t4_sha1.S |
|
163 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
164 + |
|
165 +t4_sha2.o: asm/t4_sha2.S |
|
166 + as $(ASFLAGSYF) -o $@ asm/t4_sha2.S |
|
167 + elfedit -e 'cap:hw1 -and -cmp vis vis3' $@ |
|
168 + |
|
169 files: |
|
170 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
|
171 |
|
172 Index: util/libeay.num |
|
173 ================================================================== |
|
174 diff -ru openssl-1.0.0d/util/libeay.num openssl-1.0.0d/util/libeay.num |
|
175 --- openssl-1.0.0d/util/libeay.num 2010-07-25 09:56:06.000000000 -0700 |
|
176 +++ openssl-1.0.0d/util/libeay.num 2011-05-25 11:19:15.585211842 -0700 |
|
177 @@ -4179,6 +4179,7 @@ |
|
178 UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: |
|
179 UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: |
|
180 EVP_read_pw_string_min 4552 EXIST::FUNCTION: |
|
181 +ENGINE_load_t4 4553 EXIST::FUNCTION:ENGINE |
|
182 CRYPTO_cts128_encrypt 4553 EXIST::FUNCTION: |
|
183 CRYPTO_cts128_decrypt_block 4554 EXIST::FUNCTION: |
|
184 CRYPTO_cfb128_1_encrypt 4555 EXIST::FUNCTION: |
|