Added a function that attempts to find the xmlsec1 binaries, made by Lorenzo Gil Sanchez

This commit is contained in:
Roland Hedberg
2009-12-11 08:07:05 +01:00
parent cc7c3e24f8
commit 4abc9957b2

View File

@@ -27,7 +27,13 @@ import base64
import random
import os
XMLSEC_BINARY = "/opt/local/bin/xmlsec1"
def get_xmlsec_binary():
for path in ('/opt/local/bin/xmlsec1',
'/usr/bin/xmlsec1'):
if os.path.exists(path):
return path
XMLSEC_BINARY = get_xmlsec_binary()
ID_ATTR = "ID"
NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:Assertion"
ENC_NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:EncryptedAssertion"