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.
I've founded the solution for importing certificates as a part of installation. The solution includes performing following steps:
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)