Skip to content

Commit eaae6a7

Browse files
author
Roland Hedberg
committed
Use xmlsec path information.
1 parent f7c590b commit eaae6a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/saml2/sigver.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ def to_time(_time):
324324

325325

326326
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+
"""
327334
cert_str = pem_format(key)
328335
certificate = load_cert_string(cert_str)
329336
try:
@@ -334,6 +341,8 @@ def active_cert(key):
334341
return True
335342
except AssertionError:
336343
return False
344+
except AttributeError:
345+
return False
337346

338347

339348
def cert_from_key_info(key_info, ignore_age=False):
@@ -871,7 +880,7 @@ def security_context(conf, debug=None):
871880
if conf.crypto_backend == 'xmlsec1':
872881
xmlsec_binary = conf.xmlsec_binary
873882
if not xmlsec_binary:
874-
xmlsec_binary = get_xmlsec_binary()
883+
xmlsec_binary = get_xmlsec_binary(conf.xmlsec_path)
875884
# verify that xmlsec is where it's supposed to be
876885
if not os.path.exists(xmlsec_binary):
877886
#if not os.access(, os.F_OK):

0 commit comments

Comments
 (0)