From 25f504ad3565d182dd4576704fa58d369abfbc8b Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 4 Sep 2019 09:13:19 -0700 Subject: [PATCH] Allow RSA public key type when deserializing keys --- libp2p/crypto/serialization.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libp2p/crypto/serialization.py b/libp2p/crypto/serialization.py index 5b6b276..dedcf85 100644 --- a/libp2p/crypto/serialization.py +++ b/libp2p/crypto/serialization.py @@ -1,8 +1,10 @@ from libp2p.crypto.keys import KeyType, PrivateKey, PublicKey +from libp2p.crypto.rsa import RSAPublicKey from libp2p.crypto.secp256k1 import Secp256k1PrivateKey, Secp256k1PublicKey key_type_to_public_key_deserializer = { - KeyType.Secp256k1.value: Secp256k1PublicKey.from_bytes + KeyType.Secp256k1.value: Secp256k1PublicKey.from_bytes, + KeyType.RSA.value: RSAPublicKey.from_bytes, } key_type_to_private_key_deserializer = {