aboutsummaryrefslogtreecommitdiff
path: root/util/mkdef.pl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-12-24 17:26:33 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-12-24 17:26:33 +0000
commit12aefe78f0aec57159e396b5fd8f71644a76b631 (patch)
tree65268b7691f72fd68d460e1db029f5bb54939334 /util/mkdef.pl
parent525f51f6c98751de4db3b81789044d32e3686cda (diff)
downloadopenssl-12aefe78f0aec57159e396b5fd8f71644a76b631.zip
openssl-12aefe78f0aec57159e396b5fd8f71644a76b631.tar.gz
openssl-12aefe78f0aec57159e396b5fd8f71644a76b631.tar.bz2
Fixes so NO_RSA works again.
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-xutil/mkdef.pl43
1 files changed, 42 insertions, 1 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 629982a..23fdd7f 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -39,6 +39,7 @@ foreach (@ARGV, split(/ /, $options))
$do_crypto=1 if $_ eq "libeay";
$do_crypto=1 if $_ eq "crypto";
$do_update=1 if $_ eq "update";
+ $do_ctest=1 if $_ eq "ctest";
$rsaref=1 if $_ eq "rsaref";
if (/^no-rc2$/) { $no_rc2=1; }
@@ -59,6 +60,7 @@ foreach (@ARGV, split(/ /, $options))
elsif (/^no-hmac$/) { $no_hmac=1; }
}
+
if (!$do_ssl && !$do_crypto)
{
print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n";
@@ -131,7 +133,26 @@ if($do_crypto == 1) {
open(OUT, ">>$crypto_num");
&update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto, @crypto_func);
close OUT;
-}
+}
+
+} elsif ($do_ctest) {
+
+ print <<"EOF";
+
+/* Test file to check all DEF file symbols are present by trying
+ * to link to all of them. This is *not* intended to be run!
+ */
+
+int main()
+{
+EOF
+ &print_test_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func)
+ if $do_ssl == 1;
+
+ &print_test_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func)
+ if $do_crypto == 1;
+
+ print "}\n";
} else {
@@ -340,6 +361,26 @@ sub do_defs
return(@ret);
}
+sub print_test_file
+{
+ (*OUT,my $name,*nums,@functions)=@_;
+ my $n =1;
+
+ (@e)=grep(/^SSLeay/,@functions);
+ (@r)=grep(!/^SSLeay/,@functions);
+ @functions=((sort @e),(sort @r));
+
+ foreach $func (@functions) {
+ if (!defined($nums{$func})) {
+ printf STDERR "$func does not have a number assigned\n"
+ if(!$do_update);
+ } else {
+ $n=$nums{$func};
+ print OUT "\t$func();\n";
+ }
+ }
+}
+
sub print_def_file
{
(*OUT,my $name,*nums,@functions)=@_;