Why convert P7S to CER?
A .p7s (PKCS #7 signature) carries the cryptographic signature and the signer's X.509 certificate(s) but not the signed content. Extracting the certificate lets you add it to a trust store, inspect who signed, or pass it to another system for verification without contacting the original signer.
How to convert P7S to CER
OpenSSL FREE
Run openssl pkcs7 against the .p7s to extract certificate(s) to a PEM file, then use openssl x509 to convert to a DER-encoded .cer. Pre-installed on macOS and most Linux distributions; install separately on Windows.
Microsoft Outlook APP
For signed emails verified by Outlook, click the signature badge, view the certificate, go to the Details tab, and use Copy to File to export as DER .cer. Only works for email-attached signatures, not standalone .p7s files.
About these formats
A P7S file - usually named smime.p7s - is the digital signature attached to a signed email. It proves the sender's identity and that the message was not altered in transit. You normally do…
Open .P7S details →A CER file is an X.509 digital certificate that binds an identity (a website, server, or publisher) to a public key, signed by a Certificate Authority. On Windows, double-click it to view…
Open .CER details →Quality & what to watch
- A
.p7sis a detached signature that carries the signature and signer certificate(s) but not the original document - there is nothing to 'convert', only a certificate to extract. - Keep the original
.p7sand signed file together if you need to re-verify later; the extracted.cerproves who signed but not what was signed. - A
.p7smay carry a full certificate chain; OpenSSL's output may contain multiple certificates that need to be split before converting each to.cerindividually.
Frequently asked questions
Why can't I just rename `.p7s` to `.cer`?
.p7s is a PKCS #7 container wrapping the signature and certificate(s); .cer is a bare X.509 certificate. Renaming produces a broken file.Do I need the original document to extract the certificate?
.p7s itself; you do not need the signed document to extract it.What if my `.p7s` is PEM-encoded instead of binary?
-----BEGIN PKCS7-----, change the OpenSSL flag from -inform DER to -inform PEM.Can Outlook extract certificates from standalone `.p7s` files?
.p7s files, use OpenSSL instead.