summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOlaf Johansson <olof@ethup.se>2015-06-02 07:41:35 -0400
committerRich Salz <rsalz@openssl.org>2015-06-02 11:24:44 -0400
commit8846adbd36c1de2b0d38a73ca32e28fde50083b8 (patch)
tree3a5ad7722583a69612946d5807c950bca395ac21 /tools
parent0baaff1a76d4c91b9c1121059be63175454d7b03 (diff)
downloadopenssl-new-8846adbd36c1de2b0d38a73ca32e28fde50083b8.tar.gz
GH249: Fix bad regexp in arg parsing.
Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/c_rehash.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index 887e927125..b086ff9cf0 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -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;