Default to ask a password
This commit is contained in:
parent
d279ee6010
commit
9af8762610
25
ssh-askpass
25
ssh-askpass
|
@ -2,20 +2,29 @@
|
||||||
|
|
||||||
PINENTRY=@pinentry_mac@/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
|
PINENTRY=@pinentry_mac@/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
|
||||||
|
|
||||||
|
function send() {
|
||||||
|
print -p "$@"
|
||||||
|
read -p
|
||||||
|
}
|
||||||
|
|
||||||
coproc $PINENTRY
|
coproc $PINENTRY
|
||||||
PINENTRY_PID=$!
|
PINENTRY_PID=$!
|
||||||
trap "kill -TERM $PINENTRY_PID" INT TERM
|
trap "kill -TERM $PINENTRY_PID" INT TERM
|
||||||
read -p
|
read -p
|
||||||
|
|
||||||
print -p SETDESC $@
|
send SETDESC $@
|
||||||
read -p
|
|
||||||
|
|
||||||
print -p SETOK Hide
|
case "$@" in
|
||||||
read -p
|
"Confirm user presence"*)
|
||||||
|
send SETOK Hide
|
||||||
print -p CONFIRM --one-button
|
send CONFIRM --one-button
|
||||||
read -p
|
;;
|
||||||
|
*)
|
||||||
|
send GETPIN
|
||||||
|
test "${REPLY:0:3}" = ERR && { coproc : ; exit 1 }
|
||||||
|
echo ${REPLY:2}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Close the coproc
|
# Close the coproc
|
||||||
coproc :
|
coproc :
|
||||||
exit 1
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user