@@ -162,7 +162,7 @@ def __init__(
162
162
keytype = "RSA" ,
163
163
keyusage = None ,
164
164
kid = "" ,
165
- accept_invalid_keys = True ,
165
+ ignore_invalid_keys = True ,
166
166
httpc = None ,
167
167
httpc_params = None ,
168
168
):
@@ -182,7 +182,7 @@ def __init__(
182
182
presently 'rsa' and 'ec' are supported.
183
183
:param keyusage: What the key loaded from file should be used for.
184
184
Only applicable for DER files
185
- :param accept_invalid_keys: Accept invalid keys
185
+ :param ignore_invalid_keys: Ignore invalid keys
186
186
:param httpc: A HTTP client function
187
187
:param httpc_params: Additional parameters to pass to the HTTP client
188
188
function
@@ -204,7 +204,7 @@ def __init__(
204
204
self .last_updated = 0
205
205
self .last_remote = None # HTTP Date of last remote update
206
206
self .last_local = None # UNIX timestamp of last local update
207
- self .accept_invalid_keys = accept_invalid_keys
207
+ self .ignore_invalid_keys = ignore_invalid_keys
208
208
209
209
if httpc :
210
210
self .httpc = httpc
@@ -277,7 +277,7 @@ def do_keys(self, keys):
277
277
elif inst ["kty" ].upper () in K2C :
278
278
inst ["kty" ] = inst ["kty" ].upper ()
279
279
else :
280
- if not self .accept_invalid_keys :
280
+ if not self .ignore_invalid_keys :
281
281
raise UnknownKeyType (inst )
282
282
LOGGER .warning ("While loading keys, unknown key type: %s" , inst ["kty" ])
283
283
continue
@@ -295,17 +295,17 @@ def do_keys(self, keys):
295
295
try :
296
296
_key = K2C [_typ ](use = _use , ** inst )
297
297
except KeyError :
298
- if not self .accept_invalid_keys :
298
+ if not self .ignore_invalid_keys :
299
299
raise UnknownKeyType (inst )
300
300
_error = "UnknownKeyType: {}" .format (_typ )
301
301
continue
302
302
except (UnsupportedECurve , UnsupportedAlgorithm ) as err :
303
- if not self .accept_invalid_keys :
303
+ if not self .ignore_invalid_keys :
304
304
raise err
305
305
_error = str (err )
306
306
break
307
307
except JWKException as err :
308
- if not self .accept_invalid_keys :
308
+ if not self .ignore_invalid_keys :
309
309
raise err
310
310
LOGGER .warning ("While loading keys: %s" , err )
311
311
_error = str (err )
0 commit comments