python - using https on a flask local development? -
i curious understand how ssl works have decided use ssl on local flask development environment. have read article flask.pocoo.org...ts can not understand yourserver.key
, yourserver.crt
files?
please give me idea having files free! have seen many company sell ssl want free 1 local development in computer only.
i on windows 7
openssl bundles utilities create required keys , certificates, , since you're going use locally, can self-sign certificate using same utility. can either use openssl version available in distro or openssl, or if on windows, pre-compiled version openssl.
from the common openssl commands:
generate new private key , certificate signing request
openssl req -out csr.csr -new -newkey rsa:2048 -nodes -keyout privatekey.key
generate self-signed certificate
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privatekey.key -out certificate.crt
generate certificate signing request (csr) existing private key
openssl req -out csr.csr -key privatekey.key -new
generate certificate signing request based on existing certificate
openssl x509 -x509toreq -in certificate.crt -out csr.csr -signkey privatekey.key
remove passphrase private key
openssl rsa -in privatekey.pem -out newprivatekey.pem
Comments
Post a Comment