aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartłomiej Piotrowski <Barthalion@users.noreply.github.com>2017-06-04 23:30:09 +0200
committerTad Fisher <tadfisher@gmail.com>2017-06-04 14:30:09 -0700
commit6ff06cc7f17e0ea1af88e6d295c9bfa35933adfd (patch)
tree97daad041c0be54e852dc7c9b42a53bb8fb60ad5
parent512e03c2c5dd96cd9bb90650d259a597b65fccd0 (diff)
downloadpass-otp-6ff06cc7f17e0ea1af88e6d295c9bfa35933adfd.tar.gz
pass-otp-6ff06cc7f17e0ea1af88e6d295c9bfa35933adfd.zip
Make sure $otp_algorithm is lowercase (#33)
Otherwise oathtool is unhappy.
-rwxr-xr-xotp.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/otp.bash b/otp.bash
index c46954e..95f171a 100755
--- a/otp.bash
+++ b/otp.bash
@@ -243,7 +243,7 @@ cmd_otp_code() {
case "$otp_type" in
totp)
cmd="$OATH -b --totp"
- [[ -n "$otp_algorithm" ]] && cmd+="=$otp_algorithm"
+ [[ -n "$otp_algorithm" ]] && cmd+="=${otp_algorithm,,}"
[[ -n "$otp_period" ]] && cmd+=" --time-step-size=$otp_period"s
[[ -n "$otp_digits" ]] && cmd+=" --digits=$otp_digits"
cmd+=" $otp_secret"