1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-15 04:03:41 +01:00

Try not to use loopback for gpg 2.1.11

This commit is contained in:
deajan 2019-07-23 11:37:55 +02:00
parent fe75737910
commit 741167cba3

View File

@ -331,16 +331,23 @@ function test_GPG () {
# Detect if GnuPG >= 2.1 that does not allow automatic pin entry anymore
# GnuPG 2.1.11 has a bug that does not allow usage of pinentry mode 'loopback'
# GnuPC 2.1.22 has that bug resolved
cryptToolVersion=$($CRYPT_TOOL --version | head -1 | awk '{print $3}')
cryptToolMajorVersion=${cryptToolVersion%%.*}
cryptToolSubVersion=${cryptToolVersion#*.}
cryptToolSubVersion=${cryptToolSubVersion%.*}
cryptToolMinorVersion=${cryptToolVersion##*.}
echo "$CRYPT_TOOL is $cryptToolVersion"
if [ $cryptToolMajorVersion -eq 2 ] && [ $cryptToolSubVersion -ge 1 ]; then
if [ $cryptToolMinorVersion -ge 11 ]; then
additionalParameters="--pinentry-mode loopback"
fi
fi
if [ "$CRYPT_TOOL" == "gpg2" ]; then
options="--batch --yes"