Skip to content

Commit 2be39b0

Browse files
committed
Handling of verify_ssl
1 parent 8e1101a commit 2be39b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/cryptojwt/key_bundle.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def __init__(self, keys=None, source="", cache_time=300, verify_ssl=True,
133133

134134
self._keys = []
135135
self.remote = False
136-
self.verify_ssl = verify_ssl
137136
self.cache_time = cache_time
138137
self.time_out = 0
139138
self.etag = ""
@@ -145,8 +144,10 @@ def __init__(self, keys=None, source="", cache_time=300, verify_ssl=True,
145144
self.last_updated = 0
146145
if httpc:
147146
self.httpc = httpc
147+
self.verify_ssl = None
148148
else:
149149
self.httpc = requests.request
150+
self.verify_ssl = verify_ssl
150151

151152
if keys:
152153
self.source = None
@@ -261,7 +262,10 @@ def do_remote(self):
261262
262263
:return: True or False if load was successful
263264
"""
264-
args = {"verify": self.verify_ssl}
265+
if self.verify_ssl:
266+
args = {"verify": self.verify_ssl}
267+
else:
268+
args = {}
265269

266270
try:
267271
logging.debug('KeyBundle fetch keys from: {}'.format(self.source))

0 commit comments

Comments
 (0)