Future-proof deprecated declartion parsing
authorViktor Dukhovni <openssl-users@dukhovni.org>
Sat, 9 Jan 2016 22:11:18 +0000 (17:11 -0500)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Sun, 10 Jan 2016 03:30:59 +0000 (22:30 -0500)
Support two-digest major/minor/micro numbers and die when the input
fails to parse

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
util/mkdef.pl

index 0c38934ba4c5dd0f8666ec547cd928303d58b8ed..31822e167d69cac452cedf8df81c1fa16c0f5bf7 100755 (executable)
@@ -1681,7 +1681,8 @@ sub check_version_lte()
 sub do_deprecated()
 {
        my ($decl, $plats, $algs) = @_;
-       $decl =~ /^\s*(DEPRECATEDIN_\d_\d_\d)\s*\((.*)\)\s*$/;
+       $decl =~ /^\s*(DEPRECATEDIN_\d+_\d+_\d+)\s*\((.*)\)\s*$/
+            or die "Bad DEPRECTEDIN: $decl\n";
        my $info1 .= "#INFO:";
        $info1 .= join(',', @{$plats}) . ":";
        my $info2 = $info1;