mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
use M2Crypto for encrypting (Crypto.PublicKey uses unpaded RSA\!)
This commit is contained in:
parent
e8f90a631a
commit
a6f244ec76
1 changed files with 2 additions and 1 deletions
|
|
@ -300,7 +300,8 @@ 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"]
|
||||
y = RSA.importKey(self.pubkey()).encrypt(dvsni_r, None)[0]
|
||||
pubkey = M2Crypto.RSA.load_key_string(self.pubkey())
|
||||
y = pubkey.public_encrypt(dvsni_r, M2Crypto.RSA.pkcs1_oaep_padding)
|
||||
# In dvsni, we send nonce, y, ext
|
||||
chall.data.append(c["dvsni:nonce"])
|
||||
chall.data.append(y)
|
||||
|
|
|
|||
Loading…
Reference in a new issue