Skip to content
Advertisement

Tag: pyopenssl

Django runserver_plus pyOpenSSL not installed error, although it is

Linux Mint 19.3, Python 3.8 virtual environment. So I try to run runserver_plus using ssl: Then I get following error: But the deal is that pyOpenSSL is already installed within my environment. Here is pip list output: Thanks in forward for any help! I’ve tried to install different versions of pyOpenSSL, both erlier and later. Unsuccessfully. Runserver_plus starts successfully without

How do I read(open) an ASN.1 file in python

I want to get a certificates serial number using python: Unfortunately it fails in the first line: How do I read an ASN.1 file format (DER) in Python? Answer You are opening the file as a text file, which means read tries to decode the data using UTF-8 in order to return a str object. Instead, open it as a

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