Skip to content

zulip: Allow cert_bundle to be a directory. - #952

Open
Johnboard-cmyk wants to merge 1 commit into
zulip:mainfrom
Johnboard-cmyk:cert-bundle-dir-748
Open

Johnboard-cmyk wants to merge 1 commit into
zulip:mainfrom
Johnboard-cmyk:cert-bundle-dir-748

Conversation

@Johnboard-cmyk

Copy link
Copy Markdown

The requests library accepts a directory of CA certificates (such as /etc/ssl/certs) as its verify parameter, but Client rejected any cert_bundle that was not a file. Accept directories as well.

Fixes #748. This supersedes #749, which has been inactive since March 2022. (This also replaces #951, closed and reopened so the commit message itself carries the Fixes reference.)

Fixes: #748

How did you test this PR?

Tests: new TestCertBundle tests in zulip/tests/test_client.py cover a file bundle, a directory bundle, and a missing path; the full zulip/tests/ suite passes, and ruff and mypy are clean.

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

The requests library accepts a directory of CA certificates (such as
/etc/ssl/certs) as the verify parameter, but Client rejected any
cert_bundle that was not a file. Accept directories as well, and add
tests covering a file bundle, a directory bundle, and a missing path.

Fixes zulip#748.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cert Bundle might also be a directory

2 participants