File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,13 @@ def to_time(_time):
324
324
325
325
326
326
def active_cert (key ):
327
+ """
328
+ Verifies that a key is active that is present time is after not_before
329
+ and before not_after.
330
+
331
+ :param key: The Key
332
+ :return: True if the key is active else False
333
+ """
327
334
cert_str = pem_format (key )
328
335
certificate = load_cert_string (cert_str )
329
336
try :
@@ -334,6 +341,8 @@ def active_cert(key):
334
341
return True
335
342
except AssertionError :
336
343
return False
344
+ except AttributeError :
345
+ return False
337
346
338
347
339
348
def cert_from_key_info (key_info , ignore_age = False ):
@@ -871,7 +880,7 @@ def security_context(conf, debug=None):
871
880
if conf .crypto_backend == 'xmlsec1' :
872
881
xmlsec_binary = conf .xmlsec_binary
873
882
if not xmlsec_binary :
874
- xmlsec_binary = get_xmlsec_binary ()
883
+ xmlsec_binary = get_xmlsec_binary (conf . xmlsec_path )
875
884
# verify that xmlsec is where it's supposed to be
876
885
if not os .path .exists (xmlsec_binary ):
877
886
#if not os.access(, os.F_OK):
You can’t perform that action at this time.
0 commit comments