From: Josh Karlin Date: Thu, 15 Apr 2010 15:46:11 +0000 (+0000) Subject: updated xmlsec1 paths X-Git-Tag: geni-apiv1-totrunk~58 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6b9d5288d2b0a9c425322ce98e5f7f17096ba1d3;p=sfa.git updated xmlsec1 paths --- diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index a9be4298..bff19f4c 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -177,7 +177,8 @@ class Credential(object): self.xml = None self.refid = None self.legacy = None - self.xmlsec_path = '/usr/bin/env xmlsec1' + + # Check if this is a legacy credential, translate it if so @@ -194,6 +195,14 @@ class Credential(object): self.xml = str self.decode() + # Find an xmlsec1 path + self.xmlsec_path = '' + paths = ['/usr/bin','/usr/local/bin','/bin','/opt/bin','/opt/local/bin'] + for path in paths: + if os.path.isfile(path + '/' + 'xmlsec1'): + self.xmlsec_path = path + '/' + 'xmlsec1' + break + def get_signature(self): if not self.signature: