ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
    • Domain Name Management
    • SafeDNS
    • SSL Certificates
      • Purchasing and Renewing
      • Generating A CSR (Certificate Sigining Request)
      • Validating your Certificate
      • ANS SSL Types
      • Self Signed Certificates
      • Using Server Name Indication (SNI)
      • Extended Validation Certificates
      • Generating a PFX file
      • Handling Private Keys
      • Let’s Encrypt
    • Reverse DNS Records
  • Backup and High Availability
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
  • Webcelerator
  • MyUKFast
  • Home >
  • Domains and DNS management >
  • SSL Certificates >
  • Generating a PFX file

How to Generate a PFX File¶

This guide will help you generate a PFX (also known as PKCS#12) file on different operating systems.

Generate a PFX file on Linux¶

First, check if OpenSSL is installed:

openssl version

If OpenSSL is not installed, you will see an error message. In that case, install OpenSSL:

Ubuntu¶

sudo apt install openssl

RHEL/AlmaLinux¶

sudo yum install openssl

Now you can generate the PFX file.

Suppose you have a private key file (privateKey.key), a certificate file (certificate.crt), an intermediate certificate file (intermediate.crt) and a root certificate file (root.crt). Open a terminal and run the following command:

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile intermediate.crt  -certfile root.crt

You’ll be prompted to set an export password to protect the PFX file. Remember this password; you’ll need it later.

Generate a CSR on Windows¶

Check if OpenSSL is Installed by opening a Windows Command Prompt and entering:

openssl version

If OpenSSL is not installed, you will see an error message. In that case, install OpenSSL following the official instructions located at https://github.com/openssl/openssl/blob/master/README.md.

Suppose you have a private key file (privateKey.key), a certificate file (certificate.crt), an intermediate certificate file (intermediate.crt) and a root certificate file (root.crt). Open a terminal and run the following command:

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile intermediate.crt -certfile root.crt

You’ll be prompted to set an export password. Remember this password for future use.

Next Article > How to find your private key

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ