Creating certificates for your shell scripts for macOS
This section includes the following main steps:
- Creating a certificate authority for your macOS scripts
- Creating a script signing identity for your macOS scripts
- Exporting the CA public key certificate for your macOS scripts
Creating a certificate authority for your macOS scripts
Create a certificate authority for signing your macOS scripts.You can optionally use the certificate authority you create as your default.
Procedure
- On a macOS device, run the Keychain Access utility.
- From the Keychain Access menu, choose Certificate Assistant > Create a Certificate Authority.
- Enter a name for the certificate authority, noting it for later use.
- For the user certificate type, select Code Signing.
- Enter your email address.
- In Keychain Access, select My Certificates to view the certificate authority.
Creating a certificate authority using Keychain Access
Creating a script signing identity for your macOS scripts
Create a signing identity certificate so that you can sign your scripts.
Before you begin
Creating a certificate authority for your macOS scripts
Procedure
- On a macOS device, run the Keychain Access utility.
- From the Keychain Access menu, choose Certificate Assistant > Create a Certificate.
- Enter a name for the signing identity, noting it for later use.
- For the identity type, select Leaf.
- For the certificate type, select Code Signing.
- Create the leaf.
- Choose an issuer. Select the certificate authority you created.
- Create the certificate.
- In Keychain Access, select My Certificates to view the signing identity you created.
Code Signing Tasks on the Apple Developer website
Exporting the CA public key certificate for your macOS scripts
You must now export the certificate authority you created and upload it to Ivanti EPMM.
Before you begin
Creating a script signing identity for your macOS scripts
Procedure
- On a macOS device, run the Keychain Access utility.
- Select Certificates in the left pane.
- Select the certificate of the certificate authority you created in Creating a certificate authority for your macOS scripts.
- Select File > Export Items.
- For File Format, select Certificate (.cer).
-
Select Save.
Note where you saved the .cer file
- Open the Terminal application.
- Navigate to the directory where you exported the certificate.
-
Execute the following openssl command to convert the .cer file to a .pem file. (In this example, the certificate was saved in Certificate.cer.)
openssl x509 -inform der -in Certificate.cer -out root.pem
You will later upload this .pem file to Ivanti EPMM.