~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to util/mkdef.pl

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
my $safe_stack_def = 0;
80
80
 
81
81
my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
82
 
                        "EXPORT_VAR_AS_FUNCTION" );
 
82
                        "EXPORT_VAR_AS_FUNCTION", "OPENSSL_FIPS" );
83
83
my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
84
84
my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
85
85
                         "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
94
94
                         "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" );
95
95
 
96
96
my $options="";
97
 
open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
 
97
open(IN,"<Makefile") || die "unable to open Makefile!\n";
98
98
while(<IN>) {
99
99
    $options=$1 if (/^OPTIONS=(.*)$/);
100
100
}
109
109
my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
110
110
my $no_ec; my $no_engine; my $no_hw;
111
111
my $no_fp_api;
 
112
my $fips;
112
113
 
113
114
foreach (@ARGV, split(/ /, $options))
114
115
        {
129
130
        }
130
131
        $VMS=1 if $_ eq "VMS";
131
132
        $OS2=1 if $_ eq "OS2";
 
133
        $fips=1 if $_ eq "fips";
132
134
 
133
135
        $do_ssl=1 if $_ eq "ssleay";
134
136
        if ($_ eq "ssl") {
265
267
$crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h";
266
268
$crypto.=" crypto/krb5/krb5_asn.h";
267
269
$crypto.=" crypto/tmdiff.h";
 
270
$crypto.=" fips/fips.h fips/rand/fips_rand.h";
268
271
 
269
272
my $symhacks="crypto/symhacks.h";
270
273
 
794
797
                }
795
798
                close(IN);
796
799
 
797
 
                my $algs;
 
800
                my $algs = '';
798
801
                my $plays;
799
802
 
800
803
                print STDERR "DEBUG: postprocessing ----------\n" if $debug;
864
867
 
865
868
                        $platform{$s} =
866
869
                            &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p);
 
870
                        $algorithm{$s} = '' if !defined $algorithm{$s};
867
871
                        $algorithm{$s} .= ','.$a;
868
872
 
869
873
                        if (defined($variant{$s})) {
1028
1032
                        if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
1029
1033
                                return 1;
1030
1034
                        }
 
1035
                        if ($keyword eq "OPENSSL_FIPS" && $fips) {
 
1036
                                return 1;
 
1037
                        }
1031
1038
                        return 0;
1032
1039
                } else {
1033
1040
                        # algorithms
1119
1126
sub get_version {
1120
1127
   local *MF;
1121
1128
   my $v = '?';
1122
 
   open MF, 'Makefile.ssl' or return $v;
 
1129
   open MF, 'Makefile' or return $v;
1123
1130
   while (<MF>) {
1124
1131
     $v = $1, last if /^VERSION=(.*?)\s*$/;
1125
1132
   }