How to export key pair and certificate to .pfx file.
The information in this article is general information for creating .pfx in a 3rd party application for use in some of COZYROC connections. This is general information not specific to COZYROC and you should consult with your companies internal IT admin for how to get your .pfx and certificate password if needed for your connection. You are not confined to use OpenSSL and should seek your own internal method for the creation of your own .pfx generation.
- Download and install 3rd party OpenSSL.
- Run the OpenSSL application in administrator mode. Find the folder where it is installed and go to the bin folder. Right-mouse-click on openssl.exe and select "Run as Administrator".
- Execute this command in the OpenSSL window: genrsa -des3 -out privatekey.pem 1024
- Enter a pass phrase and verify it by typing it a second time, when prompted. This will be used in the password parameter when you set up the COZYROC REST connection manager you are working with that requires the .pfx.
- Execute this command in the OpenSSL window: req -new -x509 -key privatekey.pem -out publickey.cer -days 1825
- Enter the pass phrase you created when you executed the first command above and provide answers to each of the questions asked.
- Execute this command in the OpenSSL window: pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer
- Enter the pass phrase you created when you executed the first command above and then create an export password when prompted. This can be the same or different from the first pass phrase. Verify this pass phrase when prompted.
- Locate the keys/certificates you just created. By default, they will be placed in the bin folder under the OpenSSL folder.