@@ -162,7 +162,7 @@ def __init__(
162162 keytype = "RSA" ,
163163 keyusage = None ,
164164 kid = "" ,
165- accept_invalid_keys = True ,
165+ ignore_invalid_keys = True ,
166166 httpc = None ,
167167 httpc_params = None ,
168168 ):
@@ -182,7 +182,7 @@ def __init__(
182182 presently 'rsa' and 'ec' are supported.
183183 :param keyusage: What the key loaded from file should be used for.
184184 Only applicable for DER files
185- :param accept_invalid_keys: Accept invalid keys
185+ :param ignore_invalid_keys: Ignore invalid keys
186186 :param httpc: A HTTP client function
187187 :param httpc_params: Additional parameters to pass to the HTTP client
188188 function
@@ -204,7 +204,7 @@ def __init__(
204204 self .last_updated = 0
205205 self .last_remote = None # HTTP Date of last remote update
206206 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
208208
209209 if httpc :
210210 self .httpc = httpc
@@ -277,7 +277,7 @@ def do_keys(self, keys):
277277 elif inst ["kty" ].upper () in K2C :
278278 inst ["kty" ] = inst ["kty" ].upper ()
279279 else :
280- if not self .accept_invalid_keys :
280+ if not self .ignore_invalid_keys :
281281 raise UnknownKeyType (inst )
282282 LOGGER .warning ("While loading keys, unknown key type: %s" , inst ["kty" ])
283283 continue
@@ -295,17 +295,17 @@ def do_keys(self, keys):
295295 try :
296296 _key = K2C [_typ ](use = _use , ** inst )
297297 except KeyError :
298- if not self .accept_invalid_keys :
298+ if not self .ignore_invalid_keys :
299299 raise UnknownKeyType (inst )
300300 _error = "UnknownKeyType: {}" .format (_typ )
301301 continue
302302 except (UnsupportedECurve , UnsupportedAlgorithm ) as err :
303- if not self .accept_invalid_keys :
303+ if not self .ignore_invalid_keys :
304304 raise err
305305 _error = str (err )
306306 break
307307 except JWKException as err :
308- if not self .accept_invalid_keys :
308+ if not self .ignore_invalid_keys :
309309 raise err
310310 LOGGER .warning ("While loading keys: %s" , err )
311311 _error = str (err )
0 commit comments