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

puma-dev -install can miss adding CA cert to Keychain #319

Open
jeremy opened this issue Sep 2, 2022 · 1 comment
Open

puma-dev -install can miss adding CA cert to Keychain #319

jeremy opened this issue Sep 2, 2022 · 1 comment

Comments

@jeremy
Copy link

jeremy commented Sep 2, 2022

  • If you set up a new laptop with migration assistant and don't bring over your Keychain, you'll end up with a valid cert on disk but no CA cert in Keychain.
  • Then puma-dev -install will short-circuit on the CA setup step, assuming the cert has been added (and is trusted) because it was generated previously.
  • The result is broken https, yet unclear next steps for troubleshooting.

(Similar scenario for folks who purposefully delete the cert from Keychain then wonder why puma-dev -install doesn't regenerate it.)

Deleting the cert (rm -f ~/Library/Application\ Support/io.puma.dev/*.pem) is a work-around, as is puma-dev -uninstall beforehand.

Ideally, we'd check for the cert in Keychain in addition to the pem on disk and add when missing.

@crt-files
Copy link

crt-files commented Nov 10, 2022

Here's a way to check for the cert in the Keychain:
/usr/bin/security find-certificate -a -c 'Puma-dev CA' | wc -l | /usr/bin/xargs
0 indicates there is no Puma-dev CA in the keychain.
Greater than 0 indicates there is a certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants