Browse Source

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
changes/89/650589/1
Logan V 2 years ago
parent
commit
2758d6e758
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      tools/encrypt_secret.py

+ 1
- 2
tools/encrypt_secret.py View File

@ -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…
Cancel
Save