Commit 3751896f authored by Vincent Pelletier's avatar Vincent Pelletier

http.manage: Try to reuse a previously-input passphrase before asking.

parent 88e9b8d0
...@@ -1013,6 +1013,7 @@ def manage(argv=None, stdout=sys.stdout): ...@@ -1013,6 +1013,7 @@ def manage(argv=None, stdout=sys.stdout):
import_ca_dict = defaultdict( import_ca_dict = defaultdict(
(lambda: {'crt': None, 'key': None, 'from': []}), (lambda: {'crt': None, 'key': None, 'from': []}),
) )
password = b''
for import_ca_path in args.import_ca: for import_ca_path in args.import_ca:
with open(import_ca_path, 'rb') as ca_file: with open(import_ca_path, 'rb') as ca_file:
ca_data = ca_file.read() ca_data = ca_file.read()
...@@ -1025,7 +1026,6 @@ def manage(argv=None, stdout=sys.stdout): ...@@ -1025,7 +1026,6 @@ def manage(argv=None, stdout=sys.stdout):
_cryptography_backend, _cryptography_backend,
) )
elif isinstance(component, pem.Key): elif isinstance(component, pem.Key):
password = None
while True: while True:
component_name = 'key' component_name = 'key'
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment