From da5d38acdde842b1582c329ff06d353b98224202 Mon Sep 17 00:00:00 2001 From: M B <85039141+m-bartlett@users.noreply.github.com> Date: Mon, 4 Oct 2021 08:37:47 -0600 Subject: [PATCH] security: add more examples (#6645) --- pages/osx/security.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/osx/security.md b/pages/osx/security.md index d90d55463..ca4840892 100644 --- a/pages/osx/security.md +++ b/pages/osx/security.md @@ -13,4 +13,12 @@ - Create a keychain: -`security create-keychain -p {{password}} {{name.keychain}}` +`security create-keychain -p {{password}} {{keychain.name}}` + +- 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): + +`security set-identity-preference -s {{URL|hostname|service}} -c "{{common_name}}" {{path/to/file.keychain}}` + +- 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}}`