Refactor ID to not use third-party type for cryptographic keys

Remove `ID.from_privkey` which would require specific knowledge per cryptosystem
This commit is contained in:
Alex Stokes
2019-08-02 16:03:40 -07:00
parent cff5fe0d5f
commit bd8d45fbc1
3 changed files with 6 additions and 35 deletions

View File

@ -28,9 +28,8 @@ async def cleanup_done_tasks():
def generate_id():
new_key = RSA.generate(2048, e=65537)
new_id = ID.from_pubkey(new_key.publickey())
# private_key = new_key.exportKey("PEM")
new_key = RSA.generate(2048, e=65537).publickey().export_key("DER")
new_id = ID.from_pubkey(new_key)
return new_id