summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLogan V <logan2211@gmail.com>2019-04-07 13:00:40 -0500
committerLogan V <logan2211@gmail.com>2019-04-07 13:00:40 -0500
commit2758d6e758e208bf0763554e1ffb51099371a20d (patch)
tree62cb775839cb2960f8d18b3e5b03bfdf1ea347aa /tools
parentbab008ee929473ff80962e7d2067f54faff9c923 (diff)
downloadzuul-2758d6e758e208bf0763554e1ffb51099371a20d.tar.gz
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/encrypt_secret.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/encrypt_secret.py b/tools/encrypt_secret.py
index 0829fc05e..14e3598f0 100755
--- a/tools/encrypt_secret.py
+++ b/tools/encrypt_secret.py
@@ -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('/'),))