Is it possible to store certificates into the key chain as part of installation created with PackageMaker? I would like to provide an installation which inserts the certificates into the key chain on Mac OS X.
Asked
Active
Viewed 278 times
1 Answers
0
I've founded the solution for importing certificates as a part of installation. The solution includes performing following steps:
- add certs folder (contains the certificates we wish to import) into the installation. The certs folder is extracted on the specified path (defined as CERT_PATH variable)
create a shell script (also included into the installation to be extracted), which performs the import of certificates into the keychain. The script looks similar to:
CERT_PATH = "/Applications/MyApp/certs"
security add-certificates $CERT_PATH/mycert1.crt
security add-certificates $CERT_PATH/mycert2.crt
The script is called postflight (more about Package Maker and scripts at Using PackageMaker to run a script on install)

Community
- 1
- 1

Jurica Krizanic
- 1,072
- 2
- 11
- 26