Fix cross reference table generator.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 1 Nov 2014 00:10:56 +0000 (00:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 13 Nov 2014 13:35:58 +0000 (13:35 +0000)
If the hash or public key algorithm is "undef" the signature type
will receive special handling and shouldn't be included in the
cross reference table.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 55f7fb8848b6e4bec291724a479e1580d6f407d6)

crypto/objects/obj_xref.h
crypto/objects/objxref.pl

index e23938c2960492751d4264dc9c88b804e010ceee..33cb24b0708b893847f427dc09943e8ff77b3005 100644 (file)
@@ -43,9 +43,6 @@ static const nid_triple sigoid_srt[] =
 
 static const nid_triple * const sigoid_srt_xref[] =
        {
-       &sigoid_srt[29],
-       &sigoid_srt[17],
-       &sigoid_srt[18],
        &sigoid_srt[0],
        &sigoid_srt[1],
        &sigoid_srt[7],
index 731d3ae22c2745928648f0602ba2732c292a9b7e..6c4c832ab205a02d68aba4e45a195ad38d39df09 100644 (file)
@@ -90,7 +90,10 @@ EOF
 
 foreach (@srt2)
        {
-       my $x = $xref_tbl{$_}[2];
+       my ($p1, $p2, $x) = @{$xref_tbl{$_}};
+       # If digest or signature algorithm is "undef" then the algorithm
+       # needs special handling and is excluded from the cross reference table.
+       next if $p1 eq "undef" || $p2 eq "undef";
        print "\t\&sigoid_srt\[$x\],\n";
        }