On Windows Server 2016
I have a simple python web server (in flask). It works great, and listens on port 80 (or whatever I configure it to listen on).
I need to serve it over SSL.
I have a good certificate, and imported it into the Computer/personal cert store.
Then I ran:
netsh http add sslcert ipport=0.0.0.0:443 certhash=8caef2be185a0c94d################ appid="{7E46BD40-39C6-4813-B414-019AD3332421}"
netsh http add urlacl url=https://+:443/ user=Everyone
The commands run fine. I run the flask web server on 443, but it is serving unencrypted. E.g.
https://host/ // fails, because the server is serving plain text
http://host:443 // works, because the traffic ain't ssl-ified
How to resolve?
To be clear: How to resolve without touching the flask code (we do not want to put the SSL certificate on the file system, that is not secure). I believe netsh can be used to terminate SSL in front of an arbitrary web server?