Changeset 962ea25
- Timestamp:
- Sep 23, 2010 5:49:51 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- add53ea
- Parents:
- 835cf55
- Location:
- fedd/federation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r835cf55 r962ea25 1567 1567 if 'experimentAccess' in req and 'X509' in req['experimentAccess']: 1568 1568 expcert = req['experimentAccess']['X509'] 1569 tf = tempfile.NamedTemporaryFile() 1570 tf.write(expcert) 1571 tf.flush() 1572 expid = fedid(file=tf.name) 1573 tf.close() 1569 expid = fedid(certstr=expcert) 1574 1570 self.state_lock.acquire() 1575 1571 if expid in self.state: -
fedd/federation/fedid.py
r835cf55 r962ea25 23 23 """ 24 24 HASHSIZE=20 25 def __init__(self, bits=None, hexstr=None, cert=None, file=None): 25 def __init__(self, bits=None, hexstr=None, cert=None, file=None, 26 certstr=None): 26 27 if bits != None: 27 28 self.set_bits(bits) … … 32 33 elif file != None: 33 34 self.set_file(file) 35 elif certstr: 36 self.set_certstr(certstr) 34 37 else: 35 38 self.buf = None … … 85 88 """Get the 160 bit buffer from the fedid""" 86 89 return self.buf 90 91 def set_certstr(self, certstr): 92 """ 93 Certstr is the contents of a certificate file. Unfortunately we 94 basically have to stuff it back into a temp file to read it. 95 """ 96 tf = tempfile.NamedTemporaryFile() 97 tf.write(certstr) 98 tf.flush() 99 self.set_file(tf.name) 100 tf.close() 87 101 88 102 def set_file(self, file):
Note: See TracChangeset
for help on using the changeset viewer.