Allow RSA public key type when deserializing keys

This commit is contained in:
Alex Stokes 2019-09-04 09:13:19 -07:00
parent 1a359770dd
commit 25f504ad35
No known key found for this signature in database
GPG Key ID: 51CE1721B245C086

View File

@ -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 = {