12/08/2024

Extracting a pfx for usage with 3cx using openssl

This is how to extract the key und cert from a pfx, to use it with a 3CX phone System.

Keypoint: The Key file needs to be unencrypted, so the software can use it.

Extract the Key:
openssl pkcs12 -in pfxfile.pfx -nocerts -out keyfile.key -passin pass:pfxpassword -passout pass:newpassword

Decrypt the KeyFile:
openssl rsa -in keyfile.key -out 3cxfqdn-key.pem -passin pass:newpassword

Note: Replace 3cxfqdn with the fqdn of your phone system.

openssl pkcs12 -in pfxfile.pfx -clcerts -nokeys -out 3cxfqdn-crt.pem -passin pass:pfxpassword

NOw copy the files to your instance – this might be:

C:\Program Files\3CX Phone System\Bin\nginx\conf\instance1

Now Restart the “3CX PhoneSystem Nginx Server” Service.