aboutsummaryrefslogtreecommitdiffstats
path: root/icevault
diff options
context:
space:
mode:
Diffstat (limited to 'icevault')
-rwxr-xr-xicevault6
1 files changed, 4 insertions, 2 deletions
diff --git a/icevault b/icevault
index 3ec9acb..445c3aa 100755
--- a/icevault
+++ b/icevault
@@ -371,7 +371,7 @@ sub pwgen(@) {
my $pwgen = $CONFIG{pwgen};
# see how long the password is allowed to be
- my $l = $CONFIG{'pw-maxlength'};
+ my $l = $CONFIG{'max-password-length'};
$l = min (map { my $x = $1 if defined $_->{maxLength} and $_->{maxLength} =~ /^(\d+)$/;
(defined $x and $x > 0 and $x < $l) ? $x : $l } @fields);
$pwgen =~ s/%d/$l/g;
@@ -445,8 +445,10 @@ $CONFIG{gpg} //= 'gpg';
$CONFIG{socket} //= 'S.IceVault';
$CONFIG{store} //= "$XDG_DATA_HOME/icevault/%s/%h/%i.gpg";
$CONFIG{pwgen} //= 'pwgen -s -cyn %d';
-$CONFIG{'pw-maxlength'} //= 32;
+$CONFIG{'max-password-length'} //= 32;
$CONFIG{keyid} // error "Missing keyid in configuration file";
+error "C<%s> is not a 64-bits key ID or fingerprint", $CONFIG{keyid}
+ unless $CONFIG{keyid} =~ /^(?:(?:0x)?\p{AHex}{16}|\p{AHex}{40})$/;
usage(1) unless @ARGV;
@ARGV = map { $LOCALE->decode($_) } @ARGV;