summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/openssl/openssl-0.9.7e-no-fips.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/openssl/openssl-0.9.7e-no-fips.patch b/package/openssl/openssl-0.9.7e-no-fips.patch
new file mode 100644
index 000000000..56bcde64e
--- /dev/null
+++ b/package/openssl/openssl-0.9.7e-no-fips.patch
@@ -0,0 +1,43 @@
+Ripped from fedora
+
+--- openssl-0.9.7e/Configure
++++ openssl-0.9.7e/Configure
+@@ -1161,15 +1161,21 @@
+
+ $bn_obj = $bn_asm unless $bn_obj ne "";
+
++my $fips_des_obj;
++my $fips_sha1_obj;
+ if ($fips)
+ {
++ if ($des_obj =~ /\-elf\.o$/ && $no_shared) # FIPS DES module is not PIC
++ {
++ $fips_des_obj='asm/fips-dx86-elf.o';
++ $openssl_other_defines.="#define OPENSSL_FIPS_DES_ASM\n";
++ }
++ else { $fips_des_obj=$fips_des_enc; }
++ $fips_sha1_obj='asm/sx86-elf.o' if ($sha1_obj =~ /\-elf\.o$/);
+ $des_obj=$sha1_obj="";
+ $openssl_other_defines.="#define OPENSSL_FIPS\n";
+ }
+-$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/);
+-my $fips_des_obj='asm/fips-dx86-elf.o';
+-$fips_des_obj=$fips_des_enc unless $processor eq '386';
+-my $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386';
++$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
+ $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
+ $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
+ $rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
+--- openssl-0.9.7e/Makefile.org
++++ openssl-0.9.7e/Makefile.org
+@@ -176,8 +176,8 @@
+ # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
+ SHLIB_MARK=
+
+-DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
+-SHLIBDIRS= fips crypto ssl
++DIRS= crypto ssl $(SHLIB_MARK) sigs apps test tools
++SHLIBDIRS= crypto ssl
+
+ # dirs in crypto to build
+ SDIRS= objects \