THE FILE FIELD GUIDE
.p7s

S/MIME Signature

Certificates & Keys

P7S commonly holds S/MIME signature data rather than the original document. Detached signatures require the original content, so conversion cannot necessarily extract a PDF. Preserve the original MIME message and distinguish signature verification from signer trust.

What it is used for
Signature data for mail or documents
What the file contains
Binary data
All sections, questions and sources

Content reviewed: · Editor:Kai

Opening steps

Choose your environment or purpose to see its steps.

Collect signature and original data

Detached signatures need the separate original.

  1. Identify the signed message/document and provider.
  2. Retain signature and unchanged signed data.
  3. Identify S/MIME mail versus document CMS use.
Verify with a compatible application

Separate integrity and signer trust.

  1. For mail, open the original in a compatible client.
  2. Inspect verification result and signer certificate.
  3. Review chain and validity checks.
Diagnose verification failure

Inspect the cause rather than bypassing checks.

  1. Inspect missing data, modification and encoding/newline changes.
  2. Compare signature format and tool support.
  3. Distinguish signer/chain failure from content mismatch.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • No content: check detached signatures and companion documents.
  • Verification fails: check altered bytes/line endings/MIME and signature scheme.
  • Untrusted signer: review certificate validity/chain and identity requirements.
  • Wrong document selected: match the unchanged signed data.
  • Only rendered PDF remains: distinguish presentation output from signed data.
  • Verification conditions differ: inspect time and certificate-validation settings.

P7S verification / extraction when content is embedded

  1. Identify detached/embedded form and obtain matching originals when needed.
  2. Use the matching verification process and compare any extracted content.
  3. Verify against the original data after supported signature conversion/delivery.

A valid signature does not establish safe/correct content; investigate verification failures and preserve originals.

Detached versus encapsulated content

Use the unchanged received data and identify whether content is encapsulated or detached.

Example: retain unchanged received bytes for detached-signature verification.

Source for these steps:OpenSSL Project · openssl-cms / IETF / RFC Editor · RFC 8551 — S/MIME 4.0

Interpret verification results by stage

Assess integrity and certificate trust separately and retain verification checks.

Source for these steps:OpenSSL Project · openssl-cms / IETF / RFC Editor · RFC 8551 — S/MIME 4.0

Related-format differences

Related-format differences
Format / methodRoleWhat to verify
P7SSignature dataOriginal/signer
Original message/documentSigned contentUnchanged bytes
P7BCertificate bundleDifferent role

Handling and security

Use legitimate verification tools; do not trust unknown issuers to silence errors, and inspect attachments separately.

Questions and answers

Is P7S the message?

It may contain only a signature.

Can detached signatures be checked alone?

They require the matching content.

Does a signature mean safety?

Signer trust and content safety are separate.

Can P7S always reconstruct the email?

Detached signatures may omit content; retain the original message.

May I resave the document before verifying?

Resaving can change bytes; use the unchanged received data.

Format facts: name, steward and MIME type
Formal name
CMS / PKCS#7 signature (common P7S use)
Steward / specification
IETF S/MIME / producing signing tools
MIME type
Depends on the producer or server; an extension alone does not establish a MIME type.

Primary and official sources

  • Project documentationopenssl-cms

    Reference for CMS signatures and detached-content verification.

    OpenSSL Project · Link checked:
  • StandardRFC 8551 — S/MIME 4.0

    Standard for signed email and MIME structures.

    IETF / RFC Editor · Link checked: