Permit use of ~ in key/cert files.
This commit is contained in:
parent
e20ac17107
commit
969d3c1b18
7
av98.py
7
av98.py
|
@ -912,12 +912,12 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
|
||||||
format.
|
format.
|
||||||
"""
|
"""
|
||||||
print("Loading client certificate file, in PEM format (blank line to cancel)")
|
print("Loading client certificate file, in PEM format (blank line to cancel)")
|
||||||
print("Do not use `~` to represent your home directory.")
|
|
||||||
certfile = input("Certfile path: ").strip()
|
certfile = input("Certfile path: ").strip()
|
||||||
if not certfile:
|
if not certfile:
|
||||||
print("Aborting.")
|
print("Aborting.")
|
||||||
return
|
return
|
||||||
elif not os.path.isfile(certfile):
|
certfile = os.path.expanduser(certfile)
|
||||||
|
if not os.path.isfile(certfile):
|
||||||
print("Certificate file {} does not exist.".format(certfile))
|
print("Certificate file {} does not exist.".format(certfile))
|
||||||
return
|
return
|
||||||
print("Loading private key file, in PEM format (blank line to cancel)")
|
print("Loading private key file, in PEM format (blank line to cancel)")
|
||||||
|
@ -925,7 +925,8 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
|
||||||
if not keyfile:
|
if not keyfile:
|
||||||
print("Aborting.")
|
print("Aborting.")
|
||||||
return
|
return
|
||||||
elif not os.path.isfile(keyfile):
|
keyfile = os.path.expanduser(keyfile)
|
||||||
|
if not os.path.isfile(keyfile):
|
||||||
print("Private key file {} does not exist.".format(keyfile))
|
print("Private key file {} does not exist.".format(keyfile))
|
||||||
return
|
return
|
||||||
self._activate_client_cert(certfile, keyfile)
|
self._activate_client_cert(certfile, keyfile)
|
||||||
|
|
Loading…
Reference in New Issue