Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active April 15, 2023 08:52
Show Gist options
  • Save plembo/60e83a3b9ecdcfceaea8919083f32286 to your computer and use it in GitHub Desktop.
Save plembo/60e83a3b9ecdcfceaea8919083f32286 to your computer and use it in GitHub Desktop.
Convert PEM Certificates to PKCS12

Convert PEM Certificates to PKCS12

Microsoft systems and the products of some Microsoft-dominated vendors (like HP and Brother) will not accept separate SSL keys and certficates. Instead, these need to be bundled together in PKCS12 format.

Converting PEM certificates to PKCS12 format is easily done with the openssl utility:

openssl pkcs12 -export -out _.example.com.pfx -inkey _.example.com.key -in _.example.com.crt

The name of the output file is specified after "-out". The original certificate key in PEM format is after "-inkey", while the original PEM cert is after "-in".

The utility will prompt for a password to secure the file, enter in something memorable to complete the operation (and make note of it in your Password Safe[1]. This password will be required when importing the .pfx file into vendor systems (e.g. HP printers).

The underscore dot domain notation is not mandatory, it's just how I now personally name wildcard certificates.

[1] You are using something like Password Safe to keep track of all your strong passwords, aren't you?

References:

Ivan Ristić, OpenSSL Cookbook.

@Nitro-Zeus98
Copy link

2022-07-13_21-09-08

See picture, i need it to be made in pfx format, I use software called Emby server, and it is run by a Windows 10 pro machine (Virtuel)
based on the information, how would I do this, I mean step by step :)

@plembo
Copy link
Author

plembo commented Jul 13, 2022

Sorry, this is a simple gist, not a support forum. I haven't run Emby in a while, and only use Windows occasionally. Try searching in Emby community support, https://emby.media/community, and asking any questions there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment