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

Allow specifying a certificate bundle with TLDR_CERT #243

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jtcbrule
Copy link

This pull request makes it possible to specificy a different certificate store/bundle by setting:

  • TLDR_CERT=/path/to/certificates.crt

This is a more secure alternative to disabling SSL verification entirely when behind an SSL proxy.

Use pathlib instead of os.path

Co-authored-by: Vítor Henrique <[email protected]>
Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, welcome to tldr and thanks for your contribution.


If possible can you fix this linter error?

image

@CleanMachine1
Copy link
Member

I don't see any outlying comments?

Final thoughts before merge anyone?

@owenvoke
Copy link
Member

owenvoke commented Feb 9, 2025

@CleanMachine1, I'd say re-run the CI and see what's failing. Assuming it's the linter error mentioned in the last comment.

@@ -34,12 +34,15 @@
USE_NETWORK = int(os.environ.get('TLDR_NETWORK_ENABLED', '1')) > 0
USE_CACHE = int(os.environ.get('TLDR_CACHE_ENABLED', '1')) > 0
MAX_CACHE_AGE = int(os.environ.get('TLDR_CACHE_MAX_AGE', 24*7))
CAFILE = None if os.environ.get('TLDR_CERT', None) is None else Path(os.environ.get('TLDR_CERT')).expanduser()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CAFILE = None if os.environ.get('TLDR_CERT', None) is None else Path(os.environ.get('TLDR_CERT')).expanduser()
CAFILE = None if os.environ.get('TLDR_CERT', None) is None else \
Path(os.environ.get('TLDR_CERT')).expanduser()

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.

7 participants