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

Fix CERTIFICATE_VERIFY_FAILED errors on macOS #1181

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

voronin-ilya
Copy link
Contributor

Fixes #1102

@Acly
Copy link
Owner

Acly commented Sep 16, 2024

This feels somehow even more brittle than the previous solution. At least I couldn't (quickly) find any information that confirms the cert file will always exist in this location (depending on macOS version and what packages are installed)...?

If the issue is that the environment variable typically isn't set at all, maybe it would be better to only set it if it doesn't exist. That way it would still be possible to set a custom value outside at least, without it being overwritten.

@voronin-ilya
Copy link
Contributor Author

I am unable to confirm that this file is present on every macOS version (although some Googling suggests it most likely is). Which solution do you prefer: setting SSL_CERT_FILE only if it’s not already set, or adding certifi as a submodule and including it as done with the websockets library? The current solution isn’t really working since certifi is not bundled with the Pykrita environment.

@Acly
Copy link
Owner

Acly commented Sep 17, 2024

I think adding certifi as submodule is overkill.

What might work is calling python -m certifi as a subprocess, so it uses system python instead of Krita's embedded. But this would require python to be installed on the system, which is probably not always the case either.

I generally also don't mind the fixed path, I just think the env shouldn't be overwritten if it was set already, to still allow it being set outside if the hard-coded path doesn't work. Or do that as a fallback.

@Acly Acly merged commit 36ced0d into Acly:main Sep 17, 2024
1 of 2 checks passed
@voronin-ilya voronin-ilya deleted the fix-macos-ssl branch September 17, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSL Error on MacOS still
2 participants