mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Made decrypt() more friendly to extensions
Former-commit-id: a52d6557e53ab834e8f6c39c66f4aec6f9ac0622 Former-commit-id: a19ed491bdf5cf2bfe5502752615cc465e14dddc
This commit is contained in:
+4
-2
@@ -133,11 +133,13 @@ def encrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_id, _tmp_dir=f"{home}/.con
|
|||||||
|
|
||||||
|
|
||||||
# decrypts an entry to a temporary directory
|
# 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
|
# 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)
|
_quick_pass = whitelist_verify(port, username_ssh, ip, client_device_id)
|
||||||
else:
|
else:
|
||||||
|
if _quick_pass is None:
|
||||||
_quick_pass = False
|
_quick_pass = False
|
||||||
|
|
||||||
# if a quick-unlock password is available
|
# if a quick-unlock password is available
|
||||||
|
|||||||
Reference in New Issue
Block a user