A bit less annoying - you can init a BIO with a string

This commit is contained in:
Eric Wustrow
2012-07-12 19:16:48 -04:00
parent 1c129ea1d7
commit 94b6e593fb
+1 -2
View File
@@ -303,8 +303,7 @@ class session(object):
chall.succeeded = (c["satisfied"] == "True") # TODO: this contradicts comment in protocol about meaning of "succeeded"
# Calculate y
dvsni_r = c["dvsni:r"]
bio = M2Crypto.BIO.MemoryBuffer()
bio.write(self.pubkey())
bio = M2Crypto.BIO.MemoryBuffer(self.pubkey())
pubkey = M2Crypto.RSA.load_pub_key_bio(bio)
y = pubkey.public_encrypt(dvsni_r, M2Crypto.RSA.pkcs1_oaep_padding)
# In dvsni, we send nonce, y, ext