diff --git a/app/wolServer.py b/app/wolServer.py index 46ea716..340bbcb 100644 --- a/app/wolServer.py +++ b/app/wolServer.py @@ -32,5 +32,5 @@ setup_ui(limiter, app) if __name__ == '__main__': # SSL context setup context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) - context.load_cert_chain('../certs/mycert.crt', '../certs/mycert.key') + context.load_cert_chain('certs/cert.crt', 'certs/cert.key') app.run(host='0.0.0.0', port=51820, ssl_context=context) diff --git a/gunicorn_config.py b/gunicorn_config.py index 1cab902..ec83876 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -5,8 +5,8 @@ bind = "0.0.0.0:51820" workers = 1 # or any other number of worker processes # SSL/TLS settings -certfile = "../certs/mycert.crt" -keyfile = "../certs/mycert.key" +certfile = "certs/cert.crt" +keyfile = "certs/cert.key" # WSGI application path wsgi_app = 'wolServer:app' diff --git a/setup.sh b/setup.sh index 664c630..0f4cf3a 100644 --- a/setup.sh +++ b/setup.sh @@ -1,12 +1,9 @@ #!/usr/bin/env bash -mkdir -p certs - -openssl genrsa -out certs/mycert.key 2048 - -openssl req -new -key certs/mycert.key -out certs/mycert.csr -subj "/C=/ST=/L=/O=/OU=/CN=/emailAddress=" - -openssl x509 -req -days 365 -in certs/mycert.csr -signkey certs/mycert.key -out certs/mycert.crt +mkdir -p app/certs +openssl genrsa -out app/certs/cert.key 2048 +openssl req -new -key app/certs/cert.key -out app/certs/cert.csr -subj "/C=/ST=/L=/O=/OU=/CN=/emailAddress=" +openssl x509 -req -days 365 -in app/certs/cert.csr -signkey app/certs/cert.key -out app/certs/cert.crt LOCATION="$(pwd)"