my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
"CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
"RIPEMD",
- "MDC2", "RSA", "DSA", "DH", "HMAC", "AES",
+ "MDC2", "RSA", "DSA", "DH", "EC", "HMAC", "AES",
# Envelope "algorithms"
"EVP", "X509", "ASN1_TYPEDEFS",
# Helper "algorithms"
my $no_cast;
my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2;
my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
+my $no_ec;
my $no_fp_api;
foreach (@ARGV, split(/ /, $options))
elsif (/^no-rsa$/) { $no_rsa=1; }
elsif (/^no-dsa$/) { $no_dsa=1; }
elsif (/^no-dh$/) { $no_dh=1; }
+ elsif (/^no-ec$/) { $no_ec=1; }
elsif (/^no-hmac$/) { $no_hmac=1; }
elsif (/^no-aes$/) { $no_aes=1; }
elsif (/^no-evp$/) { $no_evp=1; }
$crypto.=" crypto/rsa/rsa.h" unless $no_rsa;
$crypto.=" crypto/dsa/dsa.h" unless $no_dsa;
$crypto.=" crypto/dh/dh.h" unless $no_dh;
+$crypto.=" crypto/ec/ec.h" unless $no_ec;
$crypto.=" crypto/hmac/hmac.h" unless $no_hmac;
$crypto.=" crypto/engine/engine.h";
$variant_cnt{$s}++;
$a .= "{$variant_cnt{$s}}";
}
- if (defined($variant{$s})) { $variant{$s} .= ";"; }
- $variant{$s} = $a.":".$a1;
- if (defined($k)) { $variant{$s} .= ":$k"; }
+ my $toadd = $a.":".$a1.(defined($k)?":".$k:"");
+ my $togrep = $s.'(\{[0-9]+\})?:'.$a1.(defined($k)?":".$k:"");
+ if (!grep(/^$togrep$/,
+ split(/;/, defined($variant{$s})?$variant{$s}:""))) {
+ if (defined($variant{$s})) { $variant{$s} .= ";"; }
+ $variant{$s} .= $toadd;
+ }
print STDERR "DEBUG: make_variant: Exit with variant of ",$s," = ",$variant{$s},"\n" if $debug;
};
&$make_variant("$1_it","$1_it",
"EXPORT_VAR_AS_FUNCTION",
"FUNCTION");
- print STDERR "DEBUG: after make_variant: variant of $1_it = ",$variant{"$1_it"},"\n" if $debug;
next;
} elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
next;
&$make_variant("_shadow_$2","_shadow_$2",
"EXPORT_VAR_AS_FUNCTION",
"FUNCTION");
- print STDERR "DEBUG: after make_variant: variant of $1_it = ",$variant{"$1_it"},"\n" if $debug;
} elsif ($tag{'CONST_STRICT'} != 1) {
if (/\{|\/\*|\([^\)]*$/) {
$line = $_;
$algorithm{$s} .= ','.$a;
if (defined($variant{$s})) {
- (my $r, my $p, my $k) = split(/:/,$variant{$s});
- my $ip = join ',',map({ /^!(.*)$/ ? $1 : "!".$_ } split /,/, $p);
- $syms{$r} = 1;
- if (!defined($k)) { $k = $kind{$s}; }
- $kind{$r} = $k."(".$s.")";
- $algorithm{$r} = $algorithm{$s};
- $platform{$r} = &reduce_platforms($platform{$s}.",".$p.",".$p);
- $platform{$s} = &reduce_platforms($platform{$s}.','.$ip.','.$ip);
- print STDERR "DEBUG: \$variant{\"$s\"} = ",$variant{$s},"; \$r = $r; \$p = ",$platform{$r},"; \$a = ",$algorithm{$r},"; \$kind = ",$kind{$r},"\n" if $debug;
+ foreach $v (split /;/,$variant{$s}) {
+ (my $r, my $p, my $k) = split(/:/,$v);
+ my $ip = join ',',map({ /^!(.*)$/ ? $1 : "!".$_ } split /,/, $p);
+ $syms{$r} = 1;
+ if (!defined($k)) { $k = $kind{$s}; }
+ $kind{$r} = $k."(".$s.")";
+ $algorithm{$r} = $algorithm{$s};
+ $platform{$r} = &reduce_platforms($platform{$s}.",".$p.",".$p);
+ $platform{$s} = &reduce_platforms($platform{$s}.','.$ip.','.$ip);
+ print STDERR "DEBUG: \$variant{\"$s\"} = ",$v,"; \$r = $r; \$p = ",$platform{$r},"; \$a = ",$algorithm{$r},"; \$kind = ",$kind{$r},"\n" if $debug;
+ }
}
print STDERR "DEBUG: \$s = $s; \$p = ",$platform{$s},"; \$a = ",$algorithm{$s},"; \$kind = ",$kind{$s},"\n" if $debug;
}
delete $p{""};
- $ret = join(',',map { $p{$_} < 0 ? "!".$_ : $_ } keys %p);
+ $ret = join(',',sort(map { $p{$_} < 0 ? "!".$_ : $_ } keys %p));
print STDERR "DEBUG: Exiting reduce_platforms with \"$ret\"\n"
if $debug;
return $ret;
}
$prev = $s2; # To warn about duplicates...
if($v) {
- printf OUT " %s%-40s@%-8d DATA\n",($W32)?"":"_",$s2,$n;
+ printf OUT " %s%-39s @%-8d DATA\n",($W32)?"":"_",$s2,$n;
} else {
- printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s2,$n;
+ printf OUT " %s%-39s @%d\n",($W32)?"":"_",$s2,$n;
}
}
}
if !defined($i) || $i eq "" || !defined($syms{$sym});
my $s2 = $sym;
$s2 =~ s/\{[0-9]+\}$//;
- printf OUT "%s%-40s%d\t%s\n","",$s2,$n,$i;
+ printf OUT "%s%-39s %d\t%s\n","",$s2,$n,$i;
if (exists $r{$sym}) {
(my $s, $i) = split /\\/,$r{$sym};
my $s2 = $s;
$s2 =~ s/\{[0-9]+\}$//;
- printf OUT "%s%-40s%d\t%s\n","",$s2,$n,$i;
+ printf OUT "%s%-39s %d\t%s\n","",$s2,$n,$i;
}
}
}
$new_syms++;
my $s2 = $s;
$s2 =~ s/\{[0-9]+\}$//;
- printf OUT "%s%-40s%d\t%s\n","",$s2, ++$start_num,$i;
+ printf OUT "%s%-39s %d\t%s\n","",$s2, ++$start_num,$i;
if (exists $r{$s}) {
($s, $i) = split /\\/,$r{$s};
$s =~ s/\{[0-9]+\}$//;
- printf OUT "%s%-40s%d\t%s\n","",$s, $start_num,$i;
+ printf OUT "%s%-39s %d\t%s\n","",$s, $start_num,$i;
}
}
}