]>
Commit | Line | Data |
---|---|---|
68eb627d | 1 | #!/usr/bin/env sh |
2 | ||
68eb627d | 3 | ######## Public functions ##################### |
4 | ||
5 | #domain keyfile certfile cafile fullchain | |
6 | keychain_deploy() { | |
7 | _cdomain="$1" | |
8 | _ckey="$2" | |
9 | _ccert="$3" | |
10 | _cca="$4" | |
11 | _cfullchain="$5" | |
12 | ||
13 | _debug _cdomain "$_cdomain" | |
14 | _debug _ckey "$_ckey" | |
15 | _debug _ccert "$_ccert" | |
16 | _debug _cca "$_cca" | |
17 | _debug _cfullchain "$_cfullchain" | |
18 | ||
19 | /usr/bin/security import "$_ckey" -k "/Library/Keychains/System.keychain" | |
20 | /usr/bin/security import "$_ccert" -k "/Library/Keychains/System.keychain" | |
21 | /usr/bin/security import "$_cca" -k "/Library/Keychains/System.keychain" | |
22 | /usr/bin/security import "$_cfullchain" -k "/Library/Keychains/System.keychain" | |
23 | ||
24 | return 0 | |
25 | } |