What Is PEM Certificate File & How to Create It?
.PEM Certificate File Is a Container Format That Includes the Public Certificate
However, all are not tech-savvy, nor everyone knows the ins and outs of the SSL/the TLS certificate. And, if you’re one of those and found yourself stuck in between the complexities of the PEM certificate file, then you’re reading the right article. This post will discuss the PEM certificate and how you can create one for your website server.
What’s the .PEM Certificate File?
In other words, PEM (Privacy Enhanced Mail) is a container format for keys and digital certificates, usually used by Apache and other web server platforms. It’s a file extension that contains other certificate files. Often used for X.509 certificates, PEM is a text file that contains Base64 encoding of the certificate text, a plain-text header & a footer that marks the beginning and end of the certificate.
Below is the CSR (Certificate Signing Request) in PEM format:
MIIB9TCCAWACAQAwgbgxGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxHDAaBgNV
BAsME0RvY3VtZW50IERlcGFydG1lbnQxOTA3BgNVBAMMMFdoeSBhcmUgeW91IGRl
Y29kaW5nIG1lPyAgVGhpcyBpcyBvbmx5IGEgdGVzdCEhITERMA8GA1UEBwwISGFt
aWx0b24xETAPBgNVBAgMCFBlbWJyb2tlMQswCQYDVQQGEwJCTTEPMA0GCSqGSIb3
DQEJARYAMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJ9WRanG/fUvcfKiGl
EL4aRLjGt537mZ28UU9/3eiJeJznNSOuNLnF+hmabAu7H0LT4K7EdqfF+XUZW/2j
RKRYcvOUDGF9A7OjW7UfKk1In3+6QDCi7X34RE161jqoaJjrm/T18TOKcgkkhRzE
apQnIDm0Ea/HVzX/PiSOGuertwIDAQABMAsGCSqGSIb3DQEBBQOBgQBzMJdAV4QP
Awel8LzGx5uMOshezF/KfP67wJ93UW+N7zXY6AwPgoLj4Kjw+WtU684JL8Dtr9FX
ozakE+8p06BpxegR4BR3FMHf6p+0jQxUEAkAyb/mVgm66TyghDGC6/YkiKoZptXQ
98TwDIK/39WEB/V607As+KoYazQG8drorw==
—–END CERTIFICATE REQUEST—–
Here’s How to Create .PEM Certificate File
- Download intermediate certificate, root certificate, primary certificate, and private key file sent by the CA (Certificate Authority) like Sectigo.
- Open a text editor like Notepad and paste the whole body of the certificates and private key in the below-mentioned order:
- Private Key
- Primary Certificate
- Intermediate Certificate
- Root Certificate
- Now, add the starting and ending tags as mentioned below:
(Your Private Key)
—–END RSA PRIVATE KEY—–
—–BEGIN CERTIFICATE—–
(Your Primary SSL certificate)
—–END CERTIFICATE—–
—–BEGIN CERTIFICATE—–
(Your Intermediate certificate)
—–END CERTIFICATE—–
—–BEGIN CERTIFICATE—–
(Your Root certificate)
—–END CERTIFICATE—–