Skip to content

fix(mac-certs): Support OpenSSL/LIbreSSL and immediate returns on falure. - #8246

Open
enmande wants to merge 1 commit into
mainfrom
auth/pm-42233/create-certificates-mac-openssl
Open

fix(mac-certs): Support OpenSSL/LIbreSSL and immediate returns on falure.#8246
enmande wants to merge 1 commit into
mainfrom
auth/pm-42233/create-certificates-mac-openssl

Conversation

@enmande

@enmande enmande commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

PM-42233

📔 Objective

Improves the usability of create_certificates_mac.sh for local server development as follows:

  • Drops the specific-named -k ~/Library/Keychains/Login.keychain and uses the default keychain (login, named login.keychain-db, which was not found by the current script).
    • Default login keychain name changed some time back (~Sierra).
  • Will support either macOS default LibreSSL (shipped in /usr/bin) or OpenSSL, which users often bring as a replacement.
  • Will return immediately on any failure in the script.
    • Previously, errors would propagate, but the calculated thumbprint would always display at the end, whether a cert was properly loaded or not, potentially confusing or obfuscating the incomplete operation.

Verified locally by creating cert with both LibreSSL and OpenSSL, and seeing cert material flow through to the application.

@enmande enmande added ai-review Request a Claude code review t:tech-debt Change Type - Tech debt labels Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR makes three scoped changes to the local-development script dev/create_certificates_mac.sh: it adds set -euo pipefail so a failed step aborts before the trailing thumbprint is printed, branches the openssl pkcs12 -export call so the OpenSSL 3-only -legacy flag is passed only when openssl version reports OpenSSL 3, and removes the stale -k ~/Library/Keychains/Login.keychain argument in favor of the default keychain. The version guard correctly routes LibreSSL and OpenSSL 1.x to the branch without -legacy (where legacy PKCS#12 algorithms are already the default), and pipefail interacts safely with the existing openssl x509 | shasum | tr pipeline. No other file in the repository references this script or the old keychain path, so nothing goes stale.

Code Review Details

No findings. Developer-tooling change only — no production code, dependency, schema, or security-boundary impact.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.29%. Comparing base (ad319f0) to head (77435ed).
⚠️ Report is 50 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8246      +/-   ##
==========================================
- Coverage   63.87%   63.29%   -0.58%     
==========================================
  Files        2352     2401      +49     
  Lines      102209   104043    +1834     
  Branches     9227     9426     +199     
==========================================
+ Hits        65287    65857     +570     
- Misses      34698    35930    +1232     
- Partials     2224     2256      +32     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@enmande
enmande requested review from a team August 21, 2026 20:06
@enmande
enmande marked this pull request as ready for review August 21, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant