PKCS#7 / CMS Inspector
Open a .p7b, .p7s or .p7m in your browser: content type, certificates, CRLs, signers, algorithms and signing times. Nothing is uploaded.
How to use
- Drop the file on the box, or paste it: DER, PEM under any of the labels these files use, and bare base64 with no armour all work, and the reading says which form it recognised.
- Read the content type first. signedData with signers is a signature; signedData with certificates and no signers is a bundle; envelopedData and encryptedData are ciphertext and stay that way.
- For a signature, check eContent. Absent means detached — keep the file it was made from, because without those bytes no tool can ever verify it.
- Look through the certificates in chain order. A break is called out with the issuer that is missing, and any certificate that belongs to no chain is listed separately.
- Read the notes at the bottom before drawing conclusions: they say what the structure implies, including that nothing here has been verified or decrypted.
About this tool
ShowHide
Reads the PKCS#7 / CMS wrapper that a .p7b, .p7c, .p7s or .p7m carries and says what is inside it, entirely in your browser. The content-type OID decides everything that follows, so it is shown by name and as digits: signedData for a certificate bundle or a signature, envelopedData and authEnvelopedData for something encrypted to recipients, encryptedData for something encrypted with a shared key, and an unrecognised OID stays a number rather than becoming a guess. In a signedData, the most useful fact is usually whether eContent is there at all: when it is absent the signature is detached, which is why a lone .p7s from an email tells you nothing about the message unless you also have the original bytes. A .p7b is the same structure with certificates, no signers and no content, and it is named as a bundle rather than presented as a signature. The certificates are summarised — subject, issuer, serial, validity, key, alternative names and the SHA-256 fingerprint — and ordered into a chain by matching each issuer to a subject, so a missing intermediate or a stray unrelated certificate is visible at once. Each signer shows how it identifies itself (an issuer and serial, or a subject key identifier in version 3), its digest and signature algorithms, its signing time and its messageDigest, and whether the certificate it names is actually carried in the file. When signed attributes are present the signature is over the DER of that attribute set and not over the content, which is the single fact that defeats most people trying to verify one of these by hand. Times are read with UTCTime’s 1950–2049 window, so a two-digit year of 51 is 1951 and not 2051. BER with indefinite lengths is accepted, because Java and several signing appliances emit it and refusing it would reject real files. What it will not do is verify: no signature is checked, no chain is validated against a trust store, and nothing encrypted is decrypted, since the recipients’ private keys are by definition not in the file.
Frequently asked questions
What is the difference between PKCS#7 and CMS?
CMS (RFC 5652) is the IETF’s continuation of RSA’s PKCS#7 v1.5, and for the shapes people meet in practice the two are the same bytes: a ContentInfo with a content-type OID and a body. CMS added content types (authEnvelopedData, compressedData), allowed a signer to be identified by subject key identifier instead of issuer and serial, and tightened the attribute rules. The file extensions did not follow the split, so a .p7b, .p7s or .p7m may be either; this tool reads both and says which content type it found.
My .p7s shows no document. Is it broken?
Almost certainly not: it is a detached signature. In a detached signature the encapContentInfo has an eContentType but no eContent, so the file carries the signature and the certificates and nothing else. The data it covers travelled separately — as the body of the email, or as the file the .p7s sits next to. That is normal for S/MIME and for most signing appliances. It also means the signature cannot be checked without those exact bytes, down to the last newline.
What is a .p7b, and why does it have no signature?
A .p7b is a signedData whose only real payload is the certificates set: no eContent, no signers, and often not even a CRL. It exists because PKCS#7 was the container Windows and Java picked for shipping a chain, and it is what a CA gives you when you ask for "the chain" in a form other than concatenated PEM. Nothing in it is signed, so the version, the digest algorithm set and the empty signerInfos are just an empty envelope around a list of certificates.
What are signed attributes, and why do they change what the signature covers?
When signedAttrs is present, the signature is computed over the DER encoding of that SET OF Attribute — not over the content. The content is bound in only indirectly: one of the mandatory attributes is messageDigest, which holds the digest of the content, and another is contentType. So verifying by hand means hashing the content, comparing it with the messageDigest attribute, then re-encoding the attribute set with its SET tag (0x31, not the [0] the file stores) and verifying the signature over that. Getting the tag substitution wrong is the classic reason a hand-rolled check fails on a file that every real verifier accepts.
Can it decrypt an envelopedData or check a signature?
No, and neither is a limitation of running in a browser. An envelopedData holds the content key encrypted separately to each recipient’s public key; opening it needs a recipient’s private key, which is not in the file and should not be pasted into a web page. A signature can only be verified against the exact bytes it covers, which a detached file does not carry, and a meaningful verdict also needs a trust store to validate the chain against. What you get here is a complete reading of the structure, which is what tells you why a verification failed elsewhere.
It says the file uses indefinite lengths. Is that a problem?
No. CMS is specified as DER, but plenty of producers emit BER instead: an indefinite length is a 0x80 length byte followed by the content and a two-byte end-of-contents marker, and a streamed OCTET STRING arrives as a constructed string of segments. Java’s CMS libraries and openssl’s own streaming mode both do it, so the reader accepts it and reassembles the segments. It matters for one thing only: a signature is computed over particular encoded bytes, so a tool that re-encodes a BER file as DER before verifying will change what it hashes.
Related tools
CSR Decoder (PKCS#10)
Read a certificate signing request before you send it: subject, SANs, key size, signature algorithm, and whether its self-signature verifies.
Developer
PKCS#12 Keystore Inspector
Open a .p12 or .pfx in your browser: MAC and ciphers before the password, then the certificate chain, the private key, and whether they match.
Developer
CRL Decoder (X.509)
Read a certificate revocation list in your browser: issuer, CRL number, validity window, every revoked serial with its reason, and the signature.
Developer
Python Pickle Inspector
Disassemble a .pkl file in the browser: every opcode, the memo, the value it rebuilds, and whether loading it would run code.
Developer
OCSP Response & Request Decoder
Decode an OCSP response or request in your browser: status, responder, freshness, nonce, revocation reason and the certificates it carries.
Developer
Data URI Parser & Decoder
Decode a data: URI to see its MIME type, encoding, size and decoded contents, in your browser.
Developer