How to convert an Apache certificate into pfx

In this article, we will show you how to convert the Apache SSL certificate to pfx format. The reason is that the Ozeki SMS Gateway uses pfx format certificate files. As a result you will be able to use all the Apacha SSL certificate with Ozeki SMS Gateway. The conversion process should not take more than 10 minutes, but it requires basic knowledge of the Linux OS. It will teach you how to convert and integrate the certificate into the Ozeki SMS Gateway. Don’t waste any more time. Let’s start sending SMS messages.

Convert Apache certificate to PFX

Since Ozeki SMS Gateway uses PFX format certificates, to use Apache certificate you need to convert it to PFX. Just open the folder where the Apache certificates are stored (Figure 1).

sms gateway pfx certificate folder opening
Figure 1 - Open the certificate folder

Now run the following OpenSSL command (Figure 2).
openssl pkcs12 -export -out certificate_ozeki.pfx -inkey privkey1.pem -in cert1.pem -certfile chain1.pem -certfile fullchain1.pem

  • -export -out certificate.pfx means export and save the PFX file as certificate_ozeki.pfx.
  • -inkey privkey1.pem – Use the private key file privkey1.pem as the private key to combine with the certificate.
  • -in cert1.pem – use cert1.pem as the certificate the private key will be combined with.
  • -certfile chain1.pem – This is add additional certificates in the PFX file.

sms gateway pfx certificate open ssl convert
Figure 2 - Convert the certificate with Open SSL

After entering the command, you will be prompted to enter and verify an export password to protect the PFX file (Figure 3).

sms gateway pfx certificate password enter
Figure 3 - Enter Password

Then if you entered the password you will see that the new PFX certificate is created in the folder as you can see in the Figure 4.

sms gateway pfx certificate created
Figure 4 - PFX created

The next main operation of this guide is to activate the converted .pfx certificate in Ozeki SMS Gateway. To do that, first, you need to open the Control Panel application in Ozeki SMS Gateway. So, just navigate to the desktop of Ozeki SMS Gateway, and here, as you can see it in Figure 5, just open Control Panel by clicking on its icon.

sms gateway open control panel
Figure 5 - Open Control panel

The Control Panel is the application, where you can configure your connections and the main settings of your Ozeki SMS Gateway. At this point, to activate the converted .pfx certificate, you need to go to the Settings menu. So, to do that, please click on the icon of the Settings menu on the toolbar like in Figure 6.

sms gateway control panel settings
Figure 6 - Control Panel Settings menu

Here, in the Settings menu, you can see all the configuration submenus, where you can make modifications. Now, you need to select the 'Webserver' menu from that list. After you selected the 'Webserver' menu, a new windows pops up, where you can perform the configuration. To be able to upload the converted certificate, here, select the Advanced tab as Figure 7 shows that.

sms gateway open webserver
Figure 7 - Open Webserver Advanced menu

In the Advanced menu, you can upload the .pfx file that you converted in the previous steps. It is quite easy to upload the certificate, since you can browse the file after clicking on the upload field or simply drag and drop the certificate file as you can see it in Figure 8. Before finalizing the upload of the converted PFX certificate, you need to type the password of the certificate as well. This is the password that you had to provide when you converted the certificate.

sms gateway upload pfx certificate
Figure 8 - Upload PFX certificate

At this point, you uploaded the PFX certificate to your Ozeki SMS Gateway, but to be able to use it, you need to restart the Ozeki service. You can restart the service quite easily. For that, run the Service Ozeki restart command in the Command line as Figure 9 shows that.

restart ozeki sms gateway software
Figure 9 - Restart Ozeki Service