git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d69bf4f
)
added compute_hash() method
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 14 Oct 2009 00:23:42 +0000
(
00:23
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 14 Oct 2009 00:23:42 +0000
(
00:23
+0000)
sfa/trust/certificate.py
patch
|
blob
|
history
diff --git
a/sfa/trust/certificate.py
b/sfa/trust/certificate.py
index
5a32243
..
54d98eb
100644
(file)
--- a/
sfa/trust/certificate.py
+++ b/
sfa/trust/certificate.py
@@
-203,6
+203,9
@@
class Keypair:
k.verify_update(data)
return M2Crypto.m2.verify_final(k.ctx, base64.b64decode(sig), k.pkey)
+ def compute_hash(self, value):
+ return self.sign_string(str(value))
+
##
# The certificate class implements a general purpose X509 certificate, making
# use of the appropriate pyOpenSSL or M2Crypto abstractions. It also adds