mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 15:53:34 +02:00
security: add trusted cert add/remove examples (#8250)
This commit is contained in:
parent
635fcfc9ae
commit
4a9b06e3a9
1 changed files with 13 additions and 5 deletions
|
@ -1,19 +1,19 @@
|
||||||
# security
|
# security
|
||||||
|
|
||||||
> Administer Keychains, keys, certificates and the Security framework.
|
> Administer keychains, keys, certificates and the Security framework.
|
||||||
> More information: <https://ss64.com/osx/security.html>.
|
> More information: <https://ss64.com/osx/security.html>.
|
||||||
|
|
||||||
- List the available keychains:
|
- List all available keychains:
|
||||||
|
|
||||||
`security list-keychains`
|
`security list-keychains`
|
||||||
|
|
||||||
- Delete a specific keychain:
|
- Delete a specific keychain:
|
||||||
|
|
||||||
`security delete-keychain {{path}}`
|
`security delete-keychain {{path/to/file.keychain}}`
|
||||||
|
|
||||||
- Create a keychain:
|
- Create a keychain:
|
||||||
|
|
||||||
`security create-keychain -p {{password}} {{keychain.name}}`
|
`security create-keychain -p {{password}} {{path/to/file.keychain}}`
|
||||||
|
|
||||||
- Set a certificate to use with a website or [s]ervice by its [c]ommon name (fails if several certificates with the same common name exist):
|
- Set a certificate to use with a website or [s]ervice by its [c]ommon name (fails if several certificates with the same common name exist):
|
||||||
|
|
||||||
|
@ -21,4 +21,12 @@
|
||||||
|
|
||||||
- Add a certificate from file to a [k]eychain (if -k isn't specified, the default keychain is used):
|
- Add a certificate from file to a [k]eychain (if -k isn't specified, the default keychain is used):
|
||||||
|
|
||||||
`security add-certificates -k {{keychain.name}} {{path/to/file.pem}}`
|
`security add-certificates -k {{keychain.name}} {{path/to/cert.pem}}`
|
||||||
|
|
||||||
|
- Add a CA certificate to the per-user Trust Settings:
|
||||||
|
|
||||||
|
`security add-trusted-cert -k {{path/to/user-keychain.keychain-db}} {{path/to/ca-cert.pem}}`
|
||||||
|
|
||||||
|
- Remove a CA certificate from the per-user Trust Settings:
|
||||||
|
|
||||||
|
`security remove-trusted-cert {{path/to/ca-cert.pem}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue