GH249: Fix bad regexp in arg parsing.
authorOlaf Johansson <olof@ethup.se>
Tue, 2 Jun 2015 11:41:35 +0000 (07:41 -0400)
committerRich Salz <rsalz@openssl.org>
Tue, 2 Jun 2015 15:25:24 +0000 (11:25 -0400)
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 8846adbd36c1de2b0d38a73ca32e28fde50083b8)

tools/c_rehash.in

index 887e9271254e49857e8bee23aaed9e79a971df27..b086ff9cf0d964bc5577a8e8a6401ea305c75152 100644 (file)
@@ -15,13 +15,13 @@ my $symlink_exists=eval {symlink("",""); 1};
 my $removelinks = 1;
 
 ##  Parse flags.
-while ( $ARGV[0] =~ '-.*' ) {
+while ( $ARGV[0] =~ /^-/ ) {
     my $flag = shift @ARGV;
     last if ( $flag eq '--');
-    if ( $flag =~ /-old/) {
+    if ( $flag eq '-old') {
            $x509hash = "-subject_hash_old";
            $crlhash = "-hash_old";
-    } elsif ( $flag =~ /-h/) {
+    } elsif ( $flag eq '-h') {
            help();
     } elsif ( $flag eq '-n' ) {
            $removelinks = 0;