Skip to content

Commit

Permalink
Settings: Use system certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
VesnaT committed Jan 17, 2025
1 parent 00ffd42 commit 61fef3b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions orangecanvas/application/canvasmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2588,6 +2588,14 @@ def __update_from_settings(self):
self.scheme_widget.setNodeAnimationEnabled(node_animations)
settings.endGroup()

settings.beginGroup("network")
if settings.value("use-certs", defaultValue=False, type=bool):
import truststore

truststore.inject_into_ssl()

settings.endGroup()

self.__update_registry_filters()

def __update_registry_filters(self):
Expand Down
3 changes: 3 additions & 0 deletions orangecanvas/application/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ def __setupUi(self):
line_edit_https_proxy = QLineEdit()
self.bind(line_edit_https_proxy, "text", "network/https-proxy")
form.addRow("HTTPS proxy:", line_edit_https_proxy)
cb_use_certs = QCheckBox()
self.bind(cb_use_certs, "checked", "network/use-certs")
form.addRow("Use system certificates:", cb_use_certs)
tab.setLayout(form)

if self.__macUnified:
Expand Down
2 changes: 2 additions & 0 deletions orangecanvas/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ def init():
("network/http-proxy", str, '', 'HTTP proxy.'),

("network/https-proxy", str, '', 'HTTPS proxy.'),

("network/use-certs", bool, False, "Use system certificates."),
]


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"typing_extensions",
"packaging",
"numpy",
"truststore",
)


Expand Down

0 comments on commit 61fef3b

Please sign in to comment.