提交 9c67ab2f 编写于 作者: D Dr. Stephen Henson

Make mkdef.pl parse some ASN1 IMPLEMENT macros.

Initial support for variables in DEF files.
上级 1a7b2d33
......@@ -3,6 +3,9 @@
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
*) Make mkdef.pl parse some of the ASN1 macros and add apropriate
entries for variables.
*) Add functionality to apps/openssl.c for detecting locking
problems: As the program is single-threaded, all we have
to do is register a locking callback using an array for
......
......@@ -197,6 +197,7 @@ $crypto.=" crypto/objects/objects.h";
$crypto.=" crypto/pem/pem.h";
#$crypto.=" crypto/meth/meth.h";
$crypto.=" crypto/asn1/asn1.h";
$crypto.=" crypto/asn1/asn1t.h";
$crypto.=" crypto/asn1/asn1_mac.h";
$crypto.=" crypto/err/err.h";
$crypto.=" crypto/pkcs7/pkcs7.h";
......@@ -376,6 +377,14 @@ sub do_defs
}
if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
next;
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS\s*\(\s*(\w*)\s*\)/) {
$syms{"d2i_$1"} = 1;
$syms{"i2d_$1"} = 1;
$syms{"$1_new"} = 1;
$syms{"$1_free"} = 1;
$syms{"$1_it"} = 1;
$kind{"$1_it"} = "VARIABLE";
next;
} elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) {
next;
} elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
......@@ -675,7 +684,7 @@ sub print_test_file
sub print_def_file
{
(*OUT,my $name,*nums,my @symbols)=@_;
my $n = 1; my @e; my @r;
my $n = 1; my @e; my @r; my @v;
if ($W32)
{ $name.="32"; }
......@@ -710,11 +719,14 @@ EOF
(@e)=grep(/^SSLeay\\.*?:.*?:FUNCTION/,@symbols);
(@r)=grep(/^\w+\\.*?:.*?:FUNCTION/ && !/^SSLeay\\.*?:.*?:FUNCTION/,@symbols);
@symbols=((sort @e),(sort @r));
(@v)=grep(/^\w+\\.*?:.*?:VARIABLE/,@symbols);
@symbols=((sort @e),(sort @r), (sort @v));
foreach $sym (@symbols) {
(my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/;
my $v = 0;
$v = 1 if $sym=~ /^\w+\\.*?:.*?:VARIABLE/;
if (!defined($nums{$s})) {
printf STDERR "Warning: $s does not have a number assigned\n"
if(!$do_update);
......@@ -765,7 +777,11 @@ EOF
&& (!@a || (!$no_rijndael || !grep(/^RIJNDAEL$/,@a)))
&& (!@a || (!$no_fp_api || !grep(/^FP_API$/,@a)))
) {
printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s,$n;
if($v) {
printf OUT " %s%-40s@%-8d DATA\n",($W32)?"":"_",$s,$n;
} else {
printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s,$n;
}
# } else {
# print STDERR "DEBUG: \"$sym\" (@p):",
# " rsaref:", !!(!@p
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册