encrypt: Fix SSL error when using file pubkey
Fixes this: Traceback (most recent call last): File "zuul/tools/encrypt_secret.py", line 192, in <module> main() File "zuul/tools/encrypt_secret.py", line 109, in main pubkey = urlopen(req, context=ssl_ctx) When using a file://<path> URL for the project key. Change-Id: Ide5031eb95fda0d8932e20c178e46ba488ac1783
This commit is contained in:
parent
bab008ee92
commit
2758d6e758
|
@ -81,6 +81,7 @@ def main():
|
|||
"unencrypted connection. Your secret may get "
|
||||
"compromised.\n")
|
||||
|
||||
ssl_ctx = None
|
||||
if url.scheme == 'file':
|
||||
req = Request(args.url)
|
||||
else:
|
||||
|
@ -88,8 +89,6 @@ def main():
|
|||
ssl_ctx = ssl.create_default_context()
|
||||
ssl_ctx.check_hostname = False
|
||||
ssl_ctx.verify_mode = ssl.CERT_NONE
|
||||
else:
|
||||
ssl_ctx = None
|
||||
|
||||
# Check if tenant is white label
|
||||
req = Request("%s/api/info" % (args.url.rstrip('/'),))
|
||||
|
|
Loading…
Reference in New Issue