Skip to content

Commit

Permalink
ssl certification added back
Browse files Browse the repository at this point in the history
  • Loading branch information
DanDayne committed Nov 12, 2019
1 parent ad8c0f7 commit 1ea0684
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DBmanager/DBapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from json import load
from pathlib import Path
from HWdevices.PSI_java.JVMController import JVMController
import ssl


class SecuredResource(Resource):
Expand Down Expand Up @@ -299,7 +300,9 @@ def run_app(self):
:return: None, process is stuck on app.run()
"""
self.app.run(host='0.0.0.0')
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.load_cert_chain('MyCertificate.crt', 'MyKey.key')
self.app.run(host='0.0.0.0', ssl_context=context)

def run(self):
"""
Expand Down

0 comments on commit 1ea0684

Please sign in to comment.