1
0
Fork 0
mirror of synced 2024-11-05 09:18:59 -05:00
yadm/test/pinentry-mock

13 lines
323 B
Text
Raw Normal View History

#!/bin/bash
# This program is a custom mock pinentry program
# It always uses whatever password is found in the /tmp directory
password="$(cat /tmp/mock-password 2>/dev/null)"
echo "OK Pleased to meet you"
while read -r line; do
if [[ $line =~ GETPIN ]]; then
echo -n "D "
echo "$password"
fi
echo "OK";
done