Commit 3de956d3 authored by Vincent Pelletier's avatar Vincent Pelletier

http.manage: Ask passphrase twice during --export-ca.

parent c2aa954a
...@@ -1142,9 +1142,16 @@ def manage(argv=None, stdout=sys.stdout): ...@@ -1142,9 +1142,16 @@ def manage(argv=None, stdout=sys.stdout):
file=stdout, file=stdout,
) )
if args.export_ca is not None: if args.export_ca is not None:
encryption_algorithm = serialization.BestAvailableEncryption( while True:
getBytePass('CA export passphrase: ') passphrase = getBytePass(
'CA export passphrase: ',
) )
if getBytePass(
' (again): ',
) == passphrase:
break
print('Error: Input does not match, retrying')
encryption_algorithm = serialization.BestAvailableEncryption(passphrase)
with open(args.export_ca, 'wb') as export_ca_file: with open(args.export_ca, 'wb') as export_ca_file:
write = export_ca_file.write write = export_ca_file.write
for key_pair in SQLite3Storage( for key_pair in SQLite3Storage(
......
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