mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 21:26:39 +08:00
gpg: don't clear options on RESET assuan command
This commit is contained in:
@@ -228,9 +228,10 @@ def run_agent(device_type):
|
|||||||
pubkey_bytes = keyring.export_public_keys(env=env)
|
pubkey_bytes = keyring.export_public_keys(env=env)
|
||||||
device_type.ui = device.ui.UI(device_type=device_type,
|
device_type.ui = device.ui.UI(device_type=device_type,
|
||||||
config=vars(args))
|
config=vars(args))
|
||||||
handler = agent.Handler(device=device_type(), pubkey_bytes=pubkey_bytes)
|
|
||||||
with server.unix_domain_socket_server(sock_path) as sock:
|
with server.unix_domain_socket_server(sock_path) as sock:
|
||||||
for conn in agent.yield_connections(sock):
|
for conn in agent.yield_connections(sock):
|
||||||
|
handler = agent.Handler(device=device_type(),
|
||||||
|
pubkey_bytes=pubkey_bytes)
|
||||||
with contextlib.closing(conn):
|
with contextlib.closing(conn):
|
||||||
try:
|
try:
|
||||||
handler.handle(conn)
|
handler.handle(conn)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class Handler(object):
|
|||||||
def __init__(self, device, pubkey_bytes):
|
def __init__(self, device, pubkey_bytes):
|
||||||
"""C-tor."""
|
"""C-tor."""
|
||||||
self.reset()
|
self.reset()
|
||||||
|
self.options = []
|
||||||
device.ui.options_getter = self._get_options
|
device.ui.options_getter = self._get_options
|
||||||
self.client = client.Client(device=device)
|
self.client = client.Client(device=device)
|
||||||
# Cache public keys from GnuPG
|
# Cache public keys from GnuPG
|
||||||
@@ -108,7 +109,6 @@ class Handler(object):
|
|||||||
self.keygrip = None
|
self.keygrip = None
|
||||||
self.digest = None
|
self.digest = None
|
||||||
self.algo = None
|
self.algo = None
|
||||||
self.options = []
|
|
||||||
|
|
||||||
def handle_option(self, opt):
|
def handle_option(self, opt):
|
||||||
"""Store GPG agent-related options (e.g. for pinentry)."""
|
"""Store GPG agent-related options (e.g. for pinentry)."""
|
||||||
|
|||||||
Reference in New Issue
Block a user