How do I export my Code Signing Certificate from Safari Browser?

Export Code Signing Certificate from Safari

Apple does not trust any other code signing certificates than their own. However, if you want to use the code signing certificate installed on a Mac on some other device, you can do it by exporting the certificate. Here is how you can export it!

Code signing is a crucial element of the software development and publication process. It helps the developers ensure the authenticity of their code and make sure that the code is not  altered in any way. However, attaining a code signing certificate requires a lot of verification.

One can get a code signing certificate from a reputed certificate authority after undergoing their vetting process. It is advisable to go for an EV Code Signing Certificate as it offers add-on benefits over the regular certificate. Once you get it, you can download it, and the system (in-browser script) will fetch all the previous private keys and install the certificate in the certificate manager folder.

Now, the question arises what if you want to use the certificate in some other browser or  system? How can you use it? Let’s read this informative piece ahead and find out!

What is the need to Export a Code Signing Certificate?

The need to install a code signing certificate is clear, right? It ensures authenticity, keeps your code safe online, builds trust and reputation, and whatnot. But why export the certificate?

There is only one reason for that. Let’s say you bought a new system or started using a new browser. It may not be convenient for you to get a new certificate altogether, right? Therefore, the best thing to do here is to use the same code signing certificate in another system or browser.

Exporting the certificate helps you in using the certificate again in another browser or PC. Read ahead to know how!

Where are Certificates stored in Safari?

Unlike every other tech giant, Apple does things differently. Therefore, the Safari browser uses the awesome Keychain utility to store and manage digital certificates on the device.

If you want to see if the code signing certificate is installed on your Apple device, you need to follow the following steps!

Step 1. Keychain Access

As all of your digital certificates are installed in the Keychain Utility; you have to get there first. To open the keychain utility, go to the Finder window, choose favorites, followed by Applications and Utilities. Double-click on the Keychain Access option.

Step 2. Go to Certificates

The keychain access window will show you various options. Choose the login option under the keychain option on the left. Then, choose Category on the left and click on Certificates. On the right, you will see the certificate if it was installed by you on the PC.

Step 3. Check the private key

So far; you can see the certificate that you have installed. If you want to see the private key of the certificate, you need to expand it. If there is no private key under the certificate, you have to re-key the certificate by reinstalling it.

Once it is confirmed that the certificate is installed along with the private key, it is time for you to use it and sign the Software made by you.

How to Export the Code Signing Certificate on Safari?

So, let’s break down the prime concept of the article, the exporting of the code signing certificate on Safari. The process is pretty simple!

Here are the detailed steps of the same!

1. Open Keychain Access:

Digital certificates are installed in the Keychain Utility, so you have to get there first. To open the keychain utility, go to the Finder window, choose favorites followed by Applications and Utilities. Double-click on the Keychain Access option.

2. Go to Certificates:

The keychain access window will show you various options. Choose the login option under the keychain option on the left. Then, choose Category on the left and click on Certificates. On the right, you will see the certificate if it was installed by you on the PC. If you see the certificate, select code signing certificate and intermediate certificate.

3. Export Items:

Next, in the Keychain access toolbar, choose the Export items option.

4. An export items box will appear; here are some key things to do here:

  • In the file format box, choose the Personal Information Exchange (.p12) option.
  • Next comes the save as a box. Choose the location where you want to save the .p12 file or the code signing certificate. Make sure that you save the file in a place you remember and that you have permission to access it.
  • Lastly, name the certificate and click on Save.

5. Create a Password:

Next, in the password window, create and verify the password. Click on Ok.

This is how the code signing certificate is exported from the Safari browser. After you have the code signing certificate on the device, you can use it on other browsers and devices.

Conclusion

When you have the code signing certificate on your PC, you can use it on other machines. This is the best solution as it can be pretty expensive to get a new certificate altogether. But, as Apple only trusts the certificates produced by itself, not any other, it can be tricky to export.

But, the above-mentioned method is surefire to help you export the certificate and get the best out of your money.

Get Trusted CA based code signing certificates

Janki Mehta

Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.