mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
use M2Crypto for encrypting (Crypto.PublicKey uses unpaded RSA\!)
This commit is contained in:
@@ -300,7 +300,8 @@ class session(object):
|
|||||||
chall.succeeded = (c["satisfied"] == "True") # TODO: this contradicts comment in protocol about meaning of "succeeded"
|
chall.succeeded = (c["satisfied"] == "True") # TODO: this contradicts comment in protocol about meaning of "succeeded"
|
||||||
# Calculate y
|
# Calculate y
|
||||||
dvsni_r = c["dvsni:r"]
|
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
|
# In dvsni, we send nonce, y, ext
|
||||||
chall.data.append(c["dvsni:nonce"])
|
chall.data.append(c["dvsni:nonce"])
|
||||||
chall.data.append(y)
|
chall.data.append(y)
|
||||||
|
|||||||
Reference in New Issue
Block a user