openssl-0.9.7e-no-fips.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Ripped from fedora
  2. --- openssl-0.9.7e/Configure
  3. +++ openssl-0.9.7e/Configure
  4. @@ -1161,15 +1161,21 @@
  5. $bn_obj = $bn_asm unless $bn_obj ne "";
  6. +my $fips_des_obj;
  7. +my $fips_sha1_obj;
  8. if ($fips)
  9. {
  10. + if ($des_obj =~ /\-elf\.o$/ && $no_shared) # FIPS DES module is not PIC
  11. + {
  12. + $fips_des_obj='asm/fips-dx86-elf.o';
  13. + $openssl_other_defines.="#define OPENSSL_FIPS_DES_ASM\n";
  14. + }
  15. + else { $fips_des_obj=$fips_des_enc; }
  16. + $fips_sha1_obj='asm/sx86-elf.o' if ($sha1_obj =~ /\-elf\.o$/);
  17. $des_obj=$sha1_obj="";
  18. $openssl_other_defines.="#define OPENSSL_FIPS\n";
  19. }
  20. -$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/);
  21. -my $fips_des_obj='asm/fips-dx86-elf.o';
  22. -$fips_des_obj=$fips_des_enc unless $processor eq '386';
  23. -my $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386';
  24. +$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
  25. $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
  26. $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
  27. $rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
  28. --- openssl-0.9.7e/Makefile.org
  29. +++ openssl-0.9.7e/Makefile.org
  30. @@ -176,8 +176,8 @@
  31. # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
  32. SHLIB_MARK=
  33. -DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
  34. -SHLIBDIRS= fips crypto ssl
  35. +DIRS= crypto ssl $(SHLIB_MARK) sigs apps test tools
  36. +SHLIBDIRS= crypto ssl
  37. # dirs in crypto to build
  38. SDIRS= objects \