Skip to content

Commit

Permalink
missed
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Nov 19, 2024
1 parent 07fc1c8 commit 61bb95e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_rsa_encryption_roundtrip_der(self):
self.assertEqual(test_pt, pt)

public_key_der_bytes = base64.b64decode(RSA_PUBLIC_KEY_DER_BASE64)
rsa_pub = RSA.new_public_key_from_der_data(decoded_public_key)
rsa_pub = RSA.new_public_key_from_der_data(public_key_der_bytes)
ct_pub = rsa_pub.encrypt(p, test_pt)
pt_pub = rsa.decrypt(p, ct_pub)
self.assertEqual(test_pt, pt_pub)
Expand Down Expand Up @@ -230,8 +230,8 @@ def test_rsa_signing_roundtrip_der(self):
signature = rsa.sign(p, digest)
self.assertTrue(rsa.verify(p, digest, signature))

private_key_der_bytes = base64.b64decode(RSA_PUBLIC_KEY_DER_BASE64)
rsa_pub = RSA.new_public_key_from_der_data(private_key_der_bytes)
public_key_der_bytes = base64.b64decode(RSA_PUBLIC_KEY_DER_BASE64)
rsa_pub = RSA.new_public_key_from_der_data(public_key_der_bytes)
self.assertTrue(rsa_pub.verify(p, digest, signature))

def test_rsa_load_error(self):
Expand Down

0 comments on commit 61bb95e

Please sign in to comment.