aboutsummaryrefslogtreecommitdiffstats
path: root/package/openssl/openssl-0.9.7e-no-fips.patch
blob: 56bcde64e8cb15384f6ba592b521a91b54fe0333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 \