From 184a7c680dbd03e0536d3c7b922e9de547a4c0b7 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 15 Jun 2023 20:45:19 -0400 Subject: [PATCH] Made decrypt() more friendly to extensions Former-commit-id: a52d6557e53ab834e8f6c39c66f4aec6f9ac0622 Former-commit-id: a19ed491bdf5cf2bfe5502752615cc465e14dddc --- lib/sshyp.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index d62806b..97777e6 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -133,12 +133,14 @@ def encrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_id, _tmp_dir=f"{home}/.con # decrypts an entry to a temporary directory -def decrypt(_entry_dir, _shm_folder, _shm_entry, _quick_unlock_enabled, _tmp_dir=f"{home}/.config/sshyp/tmp/"): +def decrypt(_entry_dir, _shm_folder, _shm_entry, _quick_verify, _quick_pass=None, + _tmp_dir=f"{home}/.config/sshyp/tmp/"): # check quick-unlock status, fetch passphrase - if _quick_unlock_enabled == 'true': + if _quick_verify == 'true': _quick_pass = whitelist_verify(port, username_ssh, ip, client_device_id) else: - _quick_pass = False + if _quick_pass is None: + _quick_pass = False # if a quick-unlock password is available if not isinstance(_quick_pass, bool):