A signed add-on has a META-INF folder. Recent add-ons can carry two
signatures side by side: one in the format of a signed JAR file, and one in COSE. An
older add-on may have only the first, under the names the old signing tools gave it.
The explorer lists these files, checks the digest of every file in the archive against
them, and verifies both signatures against the certificates inside them. It does not
decide whether those certificates are trusted: that needs Mozilla’s list of root
certificates, which this page’s viewer does not carry.
The files
| File | What it is |
|---|---|
META-INF/manifest.mf | A digest of every file in the add-on, in the format of a JAR manifest: a Name line, then Digest-Algorithms, then a digest for each algorithm. |
META-INF/mozilla.sf | A signature file that holds digests of the manifest. |
META-INF/mozilla.rsa | A PKCS #7 signature over mozilla.sf, with Mozilla’s certificates. |
META-INF/cose.manifest | A list of digests for the COSE signature, in the same text format as manifest.mf. |
META-INF/cose.sig | A COSE signature over cose.manifest. |
META-INF/zigbert.sf, zigbert.rsa | The signature file and signature in older add-ons. |
What the explorer checks
Each step gives valid, FAILED or not checked, and the Signing tab lists every file with its result (the list is paged, so a large add-on is shown in full).
- Every file’s digest. Each
Name:section ofmanifest.mflists a digest for one file (MD5, SHA-1, SHA-224, SHA-256, SHA-384 or SHA-512, base64). The explorer hashes the file’s uncompressed bytes and compares each digest it can compute. A file that the manifest names but the archive lacks fails, and so does a file in the archive that the manifest does not list (Firefox refuses an add-on with an unsigned file). - The signature file.
mozilla.sfholds a…-Digest-Manifestline (a digest of the whole ofmanifest.mf) and may hold one section digest for each manifest section, computed over the section’s bytes up to and including its blank line. Both are recomputed. - The PKCS #7 signature.
mozilla.rsais a DER ContentInfo holding a SignedData with no content (the signed bytes aremozilla.sf) and the signer’s certificates. The signer is found by its issuer and serial number. When the SignerInfo has signed attributes, the explorer checks that themessageDigestattribute is the hash ofmozilla.sfand then verifies the signature over the attributes (re-tagged as a SET, as RFC 5652 says); without them it verifies the signature overmozilla.sfitself. RSA PKCS #1 v1.5 and ECDSA (P-256, P-384) keys are supported. It also checks that each certificate in the signature was signed by the next one up. - The COSE signature.
cose.sigis a CBOR COSE_Sign (tag 98) with four items: the body’s protected header (a map whose label 4 holds the intermediate certificates), an unprotected header, a null payload and one signature. The signature has its own protected header, a map with the algorithm (label 1,-7for ES256) and the signer’s certificate (label 4, thekid), and the signature value, 64 bytes (r then s). The signed bytes are the CBOR array["Signature", body protected, signature protected, external_aad, payload]where the payload iscose.manifest. Mozilla’s encoder writesexternal_aadas CBOR null (f6), where RFC 9052 says an empty byte string; the explorer tries null first and then the empty string.cose.manifestis checked likemanifest.mf, and covers every file except the signing files.
Trust is not checked. A valid signature shows that the add-on is what the certificate’s key signed. Whether that certificate chains to a root Firefox accepts (Mozilla’s add-on signing root) is decided by Firefox’s own list, and certificate expiry and revocation are not checked either.
The manifest format
The manifest starts with a header line, a blank line, then one section for each file:
Manifest-Version: 1.0
Name: popup.html
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 3Hh1…
SHA256-Digest: z/vd…
The digests are written in base64.