diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2020-02-25 16:42:12 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2020-02-25 16:42:12 +0300 |
commit | 77590ad0e25b900756322a536420faf7f95741cf (patch) | |
tree | 963149dca599bdcef15fa1cb5e2fff79f2bb5ad4 /cura_app.py | |
parent | 27902fe38fb6e3a32114f1ec705b4f92323c5c91 (diff) |
Disable SSL checking in debug mode
Allows inspecting web traffic during development
CURA-7150
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cura_app.py b/cura_app.py index 38d1149080..1f0c4a0743 100755 --- a/cura_app.py +++ b/cura_app.py @@ -15,6 +15,8 @@ import sys import Arcus # @UnusedImport import Savitar # @UnusedImport +from PyQt5.QtNetwork import QSslConfiguration, QSslSocket + from UM.Platform import Platform from cura import ApplicationMetadata from cura.ApplicationMetadata import CuraAppName @@ -209,5 +211,10 @@ if Platform.isLinux() and getattr(sys, "frozen", False): import trimesh.exchange.load os.environ["LD_LIBRARY_PATH"] = old_env +if ApplicationMetadata.CuraDebugMode: + ssl_conf = QSslConfiguration.defaultConfiguration() + ssl_conf.setPeerVerifyMode(QSslSocket.VerifyNone) + QSslConfiguration.setDefaultConfiguration(ssl_conf) + app = CuraApplication() app.run() |