Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings: Use system certificates #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions orangecanvas/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@ def fix_set_proxy_env():
else:
os.environ.pop(env_scheme, "")

if settings.value("network/use-certs", False, bool):
import truststore

truststore.inject_into_ssl()


def fix_macos_nswindow_tabbing():
warnings.warn(
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
Loading