# Taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ # # Generate server.pem with the following command: # # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes # # Put the "server.pem" file with this "simple-https-server.py" file, and execute: # # python simple-https-server.py # # Then in your browser, visit: # # https://localhost:4443 # # To make this HTTPS can be accessed by Java, we need to import the certificate # into JDK. # # From: https://www.grim.se/guide/jre-cert
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler import ssl