mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 16:48:06 +08:00
gpg: allow pinentry UI via "display=" option
This commit is contained in:
@@ -114,6 +114,11 @@ def sign_digest(sock, keygrip, digest):
|
||||
|
||||
ttyname = subprocess.check_output('tty').strip()
|
||||
options = ['ttyname={}'.format(ttyname)] # set TTY for passphrase entry
|
||||
|
||||
display = os.environ.get('DISPLAY')
|
||||
if display is not None:
|
||||
options.append('display={}'.format(display))
|
||||
|
||||
for opt in options:
|
||||
assert _communicate(sock, 'OPTION {}'.format(opt)) == b'OK'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user