Changeset df35876
- Timestamp:
- Jul 8, 2012 10:54:05 PM (12 years ago)
- Branches:
- compt_changes, master
- Children:
- 4708875
- Parents:
- 25bf6cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/proof.py
r25bf6cc rdf35876 6 6 import sys 7 7 import os, os.path 8 import re 8 9 9 10 from string import join … … 162 163 163 164 return pp.proof 165 @staticmethod 166 def pem_to_der(c): 167 pat = '-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE' 168 m = re.match(pat, c, re.DOTALL) 169 if m: return b64decode(m.group(1)) 170 else: return c 171 164 172 165 173 @staticmethod … … 173 181 self = proof(d['prover'], d['principal'], d['attribute'], None) 174 182 for c in d.get('credential', []): 175 if ac.load_id_chunk(c) != ABAC.ABAC_CERT_SUCCESS: 183 c = self.pem_to_der(c) 184 if ac.load_id_chunk(c)!= ABAC.ABAC_CERT_SUCCESS: 176 185 ac.load_attribute_chunk(c) 177 186 self.creds = ac.credentials()
Note: See TracChangeset
for help on using the changeset viewer.