Skip to content
Advertisement

Tag: network-programming

extracting public key from certificate and encrypting data

This is for a homework assignment! I get the server’s certificate using get_peer_certificate() and the calling dump_certificate to dump the certificate in a variable. The format is PEM and looks right to me. How do I extract the server’s public key from this file (‘server.pubkey’) and encrypt plaintext using RSA algorithm and any python library. At the time of writing

Advertisement