Skip to content

Commit

Permalink
Make the LocalKeyManagementFacility actually work.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Sep 4, 2008
1 parent 8174fdf commit bfd5a73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/keas/kmi/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self, url):
def generate(self):
"""See interfaces.IKeyGenerationService"""
client = self.clientClass(self.url)
client.POST('/new')
client.post('/new')
return client.contents

def getEncryptionKey(self, key):
Expand All @@ -154,7 +154,7 @@ def getEncryptionKey(self, key):
self._cache[key][0] + self.timeout > time.time()):
return self._cache[key][1]
client = self.clientClass(self.url)
client.POST('/key', key)
client.post('/key', key)
encryptionKey = client.contents
self._cache[key] = (time.time(), encryptionKey)
return encryptionKey
Expand Down
2 changes: 2 additions & 0 deletions src/keas/kmi/testclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
def ping(kmf):
client = kmf.clientClass(kmf.url)
print client.fullStatus
print
print client.contents


def new_key(kmf):
Expand Down
2 changes: 1 addition & 1 deletion src/keas/kmi/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FakeRESTClient(object):
def __init__(self, url):
self.url = url

def POST(self, url, data=None):
def post(self, url, data=None):
io = cStringIO.StringIO(data) if data else None
request = browser.TestRequest(io)
request.method = 'POST'
Expand Down

0 comments on commit bfd5a73

Please sign in to comment.