openssl.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. --- openssl-0.9.7.orig/Configure
  2. +++ openssl-0.9.7/Configure
  3. @@ -1,4 +1,4 @@
  4. -:
  5. +#!/usr/bin/perl
  6. eval 'exec perl -S $0 ${1+"$@"}'
  7. if $running_under_some_shell;
  8. ##
  9. @@ -373,6 +373,39 @@
  10. # assembler versions -- currently defunct:
  11. ##"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer:::(unknown):SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${alpha_asm}",
  12. +# Sane Linux configuration values, stolen from the Debian package....
  13. +"linux-alpha","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  14. +"linux-alpha-ev4","gcc:-DTERMIO -O3 -mcpu=ev4 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  15. +"linux-alpha-ev5","gcc:-DTERMIO -O3 -mcpu=ev5 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  16. +"linux-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  17. +"linux-freebsd-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  18. +"linux-freebsd-i386", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  19. +"linux-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  20. +"linux-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  21. +"linux-ia64","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  22. +#"linux-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
  23. +"linux-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  24. +"linux-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -mcpu=i486 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  25. +"linux-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -mcpu=i586 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  26. +"linux-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -mcpu=i686 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  27. +"linux-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  28. +"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  29. +"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  30. +"linux-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  31. +"linux-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  32. +"linux-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  33. +"linux-openbsd-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  34. +"linux-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  35. +"linux-openbsd-mips","gcc:-O2 -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  36. +"linux-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  37. +"linux-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  38. +"linux-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  39. +"linux-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  40. +"linux-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  41. +"linux-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  42. +"linux-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  43. +"linux-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v8 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  44. +"linux-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,-Av8plus -fomit-frame-pointer -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  45. # The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
  46. # bn86-elf.o file file since it is hand tweaked assembler.
  47. "linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  48. --- openssl-0.9.7.orig/crypto/md5/asm/md5-sparcv9.S
  49. +++ openssl-0.9.7/crypto/md5/asm/md5-sparcv9.S
  50. @@ -72,14 +72,14 @@
  51. #define Dval R8
  52. #if defined(MD5_BLOCK_DATA_ORDER)
  53. -# if defined(OPENSSL_SYSNAME_ULTRASPARC)
  54. +/*# if defined(OPENSSL_SYSNAME_ULTRASPARC)*/
  55. # define LOAD lda
  56. # define X(i) [%i1+i*4]%asi
  57. # define md5_block md5_block_asm_data_order_aligned
  58. # define ASI_PRIMARY_LITTLE 0x88
  59. -# else
  60. +/*# else
  61. # error "MD5_BLOCK_DATA_ORDER is supported only on UltraSPARC!"
  62. -# endif
  63. +# endif*/
  64. #else
  65. # define LOAD ld
  66. # define X(i) [%i1+i*4]
  67. --- openssl-0.9.7.orig/crypto/opensslconf.h
  68. +++ openssl-0.9.7/crypto/opensslconf.h
  69. @@ -4,17 +4,38 @@
  70. /* OpenSSL was configured with the following options: */
  71. #ifndef OPENSSL_DOING_MAKEDEPEND
  72. +#ifndef OPENSSL_NO_IDEA
  73. +# define OPENSSL_NO_IDEA
  74. +#endif
  75. +#ifndef OPENSSL_NO_MDC2
  76. +# define OPENSSL_NO_MDC2
  77. +#endif
  78. +#ifndef OPENSSL_NO_RC5
  79. +# define OPENSSL_NO_RC5
  80. +#endif
  81. #ifndef OPENSSL_NO_KRB5
  82. # define OPENSSL_NO_KRB5
  83. #endif
  84. #endif /* OPENSSL_DOING_MAKEDEPEND */
  85. +#ifndef OPENSSL_THREADS
  86. +# define OPENSSL_THREADS
  87. +#endif
  88. /* The OPENSSL_NO_* macros are also defined as NO_* if the application
  89. asks for it. This is a transient feature that is provided for those
  90. who haven't had the time to do the appropriate changes in their
  91. applications. */
  92. #ifdef OPENSSL_ALGORITHM_DEFINES
  93. +# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
  94. +# define NO_IDEA
  95. +# endif
  96. +# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2)
  97. +# define NO_MDC2
  98. +# endif
  99. +# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
  100. +# define NO_RC5
  101. +# endif
  102. # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
  103. # define NO_KRB5
  104. # endif
  105. @@ -27,7 +48,7 @@
  106. #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
  107. #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
  108. -#define OPENSSLDIR "/usr/local/ssl"
  109. +#define OPENSSLDIR "/usr/lib/ssl"
  110. #endif
  111. #endif
  112. @@ -79,7 +100,7 @@
  113. #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
  114. #define CONFIG_HEADER_BN_H
  115. -#undef BN_LLONG
  116. +#define BN_LLONG
  117. /* Should we define BN_DIV2W here? */
  118. @@ -98,7 +119,7 @@
  119. #define CONFIG_HEADER_RC4_LOCL_H
  120. /* if this is defined data[i] is used instead of *data, this is a %20
  121. * speedup on x86 */
  122. -#undef RC4_INDEX
  123. +#define RC4_INDEX
  124. #endif
  125. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  126. @@ -112,14 +133,14 @@
  127. /* the following is tweaked from a config script, that is why it is a
  128. * protected undef/define */
  129. #ifndef DES_PTR
  130. -#undef DES_PTR
  131. +#define DES_PTR
  132. #endif
  133. /* This helps C compiler generate the correct code for multiple functional
  134. * units. It reduces register dependancies at the expense of 2 more
  135. * registers */
  136. #ifndef DES_RISC1
  137. -#undef DES_RISC1
  138. +#define DES_RISC1
  139. #endif
  140. #ifndef DES_RISC2
  141. @@ -133,7 +154,7 @@
  142. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
  143. * Very mucy CPU dependant */
  144. #ifndef DES_UNROLL
  145. -#undef DES_UNROLL
  146. +#define DES_UNROLL
  147. #endif
  148. /* These default values were supplied by
  149. --- openssl-0.9.7.orig/ssl/ssl_algs.c
  150. +++ openssl-0.9.7/ssl/ssl_algs.c
  151. @@ -109,3 +109,8 @@
  152. return(1);
  153. }
  154. +#undef SSLeay_add_ssl_algorithms
  155. +int SSLeay_add_ssl_algorithms(void)
  156. + {
  157. + return SSL_library_init();
  158. + }
  159. --- openssl-0.9.7.orig/tools/c_rehash
  160. +++ openssl-0.9.7/tools/c_rehash
  161. @@ -1,4 +1,4 @@
  162. -#!/usr/local/bin/perl
  163. +#!/usr/bin/perl
  164. # Perl c_rehash script, scan all files in a directory
  165. --- openssl-0.9.7.orig/tools/c_rehash.in
  166. +++ openssl-0.9.7/tools/c_rehash.in
  167. @@ -1,4 +1,4 @@
  168. -#!/usr/local/bin/perl
  169. +#!/usr/bin/perl
  170. # Perl c_rehash script, scan all files in a directory
  171. --- openssl-0.9.7.orig/util/clean-depend.pl
  172. +++ openssl-0.9.7/util/clean-depend.pl
  173. @@ -1,4 +1,4 @@
  174. -#!/usr/local/bin/perl -w
  175. +#!/usr/bin/perl
  176. # Clean the dependency list in a makefile of standard includes...
  177. # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
  178. --- openssl-0.9.7.orig/util/extract-names.pl
  179. +++ openssl-0.9.7/util/extract-names.pl
  180. @@ -1,4 +1,4 @@
  181. -#!/usr/bin/perl
  182. +#!/usr/bin/perl
  183. $/ = ""; # Eat a paragraph at once.
  184. while(<STDIN>) {
  185. --- openssl-0.9.7.orig/util/mkdef.pl
  186. +++ openssl-0.9.7/util/mkdef.pl
  187. @@ -1,4 +1,4 @@
  188. -#!/usr/local/bin/perl -w
  189. +#!/usr/bin/perl
  190. #
  191. # generate a .def file
  192. #
  193. --- openssl-0.9.7.orig/util/mkerr.pl
  194. +++ openssl-0.9.7/util/mkerr.pl
  195. @@ -1,4 +1,4 @@
  196. -#!/usr/local/bin/perl -w
  197. +#!/usr/bin/perl
  198. my $config = "crypto/err/openssl.ec";
  199. my $debug = 0;
  200. --- openssl-0.9.7.orig/util/mkstack.pl
  201. +++ openssl-0.9.7/util/mkstack.pl
  202. @@ -1,4 +1,4 @@
  203. -#!/usr/local/bin/perl -w
  204. +#!/usr/bin/perl
  205. # This is a utility that searches out "DECLARE_STACK_OF()"
  206. # declarations in .h and .c files, and updates/creates/replaces
  207. --- openssl-0.9.7.orig/util/pod2man.pl
  208. +++ openssl-0.9.7/util/pod2man.pl
  209. @@ -1,4 +1,4 @@
  210. -: #!/usr/bin/perl-5.005
  211. +#!/usr/bin/perl
  212. eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
  213. if $running_under_some_shell;
  214. --- openssl-0.9.7.orig/util/selftest.pl
  215. +++ openssl-0.9.7/util/selftest.pl
  216. @@ -1,4 +1,4 @@
  217. -#!/usr/local/bin/perl -w
  218. +#!/usr/bin/perl
  219. #
  220. # Run the test suite and generate a report
  221. #