Extract the Private Key from the P12 Certificate

When you have your P12 certificate, you can extract the private key from the certificate. Use this key to sign your header when sending an API message. Follow these steps to automate the extraction of your private key.
IMPORTANT
If you are using the SDK to establish communication, you do not need to extract the private key from the P12 certificate.

Prerequisite

You must have a tool such as OpenSSL installed on your system.

Extract the Private Key

Follow these steps to extract the private key using OpenSSL:
  1. Open the command-line tool and navigate to the directory that contains the P12 certificate.
  2. Enter this command:
    openssl pkcs12 -in [certificate name] -nodes -nocerts -out [private key name]
  3. Enter the password for the certificate.
    The password is set when creating the P12 certificate in the
    Smartpay Fuse Portal
    .
The new certificate will be added to the directory using the private key name you supplied in Step 2.