python3 -m http.server with ssl

28 views Asked by At

I would like to set up a test server using the http.server library.

To set up a simple test server, we would commonly use the command

python3 -m http.server <port>

But I have to test, the connection over TLS and therefore need a simple "one-liner", to include a ssl-certificate.

Is there by any chance another flag, I could use to include a dummy self-signed certificate?

Or do I have to write a casual script, generate a certificate using by using openssl etc.?

This said, I know how to generate a certificate and use more "compplicated ways". I am searching for the most lightway version.

Thanks a lot

0

There are 0 answers