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

security: add trusted cert add/remove examples #8250

Merged

Conversation

adrienthebo
Copy link
Collaborator

This commit adds examples of adding custom CA certificates to the MacOS
trusted settings keychain. This allows developers working with locally
generated self-signed certificates to quickly trust a CA certificate for
testing purposes and remove them when done testing.

  • MacOS 12.4 Monterey, PROJECT:Security-60158.120.9 (note that the security binary doesn't have a version flags, but running strings $(which security)|grep PROJECT will emit the packaged security version.)

  • The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.

  • The page(s) have at most 8 examples.

  • The page description(s) have links to documentation or a homepage.

  • The page(s) follow the content guidelines.

  • The PR title conforms to the recommended templates.

This commit adds examples of adding custom CA certificates to the MacOS
trusted settings keychain. This allows developers working with locally
generated self-signed certificates to quickly trust a CA certificate for
testing purposes and remove them when done testing.
@github-actions github-actions bot added the page edit Changes to an existing page(s). label Jul 25, 2022

- Add a CA certificate to the per-user Trust Settings:

`security add-trusted-cert -k {{path/to/login.keychain-db}} {{ca-cert.pem}}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the last option ca-cert.pem just require the file name or a whole path?

(Also I just saw that this page could need a refactor for its arguments. E.g. pathpath/to/stuff, keychain.namepath/to/keychain.name. Just in case you're motivated.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The path to ca-cert.pem does need to be the whole path, will amend the example. Will also refactor the arguments accordingly!

Also, throwing a quick thanks - I've been using tldr for coming up on 7 years, and they've been incredibly helpful. I'm equally delighted that contributing improvements is a really positive experience, y'all are great!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm glad it's helpful to you! (And wow, 7 years ago tldr was still really small)

Copy link
Collaborator

@marchersimon marchersimon left a comment

Choose a reason for hiding this comment

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

Just some unwitten tldr-conventions.

pages/osx/security.md Outdated Show resolved Hide resolved
pages/osx/security.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@marchersimon marchersimon left a comment

Choose a reason for hiding this comment

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

Thanks @adrienthebo

Copy link
Member

@mfrw mfrw left a comment

Choose a reason for hiding this comment

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

LGTM :)
Thank you @adrienthebo for your contribution.

@marchersimon marchersimon merged commit 4a9b06e into tldr-pages:main Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
page edit Changes to an existing page(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants