Knowledgebase: Using TTMSFNCWebSocketServer via SSL

Below you can find various topics around SSL with TTMSFNCWebSocketServer. Click on the topic title to expand the description.

Export an existing certificate on a Windows Server

To reuse an existing certificate from IIS you can follow the steps below to export your certificate to a PFX file that you can convert to the necessary PEM format.

  1. Press Win+R, type in mmc and click OK to open Microsoft Management console
  2. Click File in the menu bar then select Add/Remove Snap-in
  3. Select Certificates from the Available snap ins and click Add
  4. Choose Computer account then click Next
  5. Select Local Computer then click Finish
  6. Click OK to add the selected snap-in to the console window.
  7. Go to the Personal > Certificates store (on the left), right-click on the certificate you want to export and select All Tasks > Export
  8. When the Certificate Export Wizard opens, click Next to proceed
  9. When prompted, select Yes, export the private key and press Next
  10. In the Export File Format dialogue window select Personal Information Exchange - PKCS #12 (.PFX) as the format you want to use. You may also check the Include all certificates in the certification path if possible option to place all intermediate certificates into the PFX file. Once done, click Next
  11. Specify the password for the PFX file and click Next
  12. Specify the location and name of the file where PFX will be exported. Click Next
  13. To complete the wizard, click the Finish button. The certificate along with the private key has been successfully exported to the PFX file when the The export was successful. message appears.


Convert PFX to PEM

To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:

openssl pkcs12 -in filename.pfx -out cert.pem -nodes