6.2 KiB
TLS Lens
Deutsch: README.de.md
Firefox extension that shows the SSL/TLS certificate of the page you are on — compact, in a popup, without detouring through Firefox's page information dialog.
Features
- Tabbed interface — Overview, Certificate, Chain, SAN and Technical; the header permanently shows hostname, plain-language summary and status
- Connection status — icon and status badge are coloured for secure, weak or broken connections; detects expired certificates, domain mismatches and untrusted issuers
- Plain-language summary — one line without jargon, right below the hostname
- Key figures at a glance — three tiles for protocol, remaining lifetime and issuer
- Warnings about weak configuration — readable notes on outdated TLS versions, weak cipher suites, SHA-1 signatures, short keys, insufficient Certificate Transparency or imminent expiry. Shown only when there is something to report
- Connection details — TLS version, cipher suite, Extended Validation marker, Certificate Transparency status and OCSP query
- Explanatory tooltips — every technical term is explained in one sentence on hover or keyboard focus
- Certificate data — common name, validation level (DV/OV/EV), issuer (O/CN), validity period with a progress bar
- Country of the issuing CA — flag, translated country name and ISO code, taken from the certificate chain when the issuer omits it
- Subject Alternative Names (SAN) — read straight from the DER certificate, with the list folding out on demand
- Authority Information Access (AIA) — OCSP responder and CA Issuers URLs
- Certificate chain — shown as a tree from the trusted root down to the website's certificate
- Technical details — their own tab: SHA-256 fingerprint, serial number, public key algorithm and size, signature algorithm, key usage and extended key usage
- Copy — plain-text report or the certificate as PEM (the whole chain) to the clipboard
- Icon warning — the toolbar icon switches to an error icon on certificate errors
- Light and dark theme — follows the system by default, switchable in the settings menu
- Bilingual — German and English, switchable in the settings menu (including "Automatic", following the browser language)
Installation
Temporary install (for testing)
- Open
about:debugging#/runtime/this-firefoxin Firefox - Click Load Temporary Add-on…
- Select
manifest.jsonfrom this directory
The extension stays active until Firefox is restarted.
With web-ext
npx web-ext run # start Firefox with the extension loaded
npx web-ext lint # check the manifest and source
npx web-ext build # produce a signable package in web-ext-artifacts/
Requires Firefox 140 or newer (strict_min_version in the manifest).
Usage
Click the toolbar icon — the popup shows the data for the current page.
Note: certificate data can only be captured while the request is in flight. Tabs that were already open before the extension was activated therefore have no data. A click on Re-check in the popup is enough.
On some Mozilla-owned domains (addons.mozilla.org, accounts.firefox.com and others) Firefox blocks extension access — the popup says so.
Project structure
manifest.json Manifest V2, Firefox-specific settings
background.js Reads securityInfo per request, caches it per tab, drives the
icon, computes the fingerprint and the PEM
lib/asn1-parser.js Minimal ASN.1/DER parser for AIA, SAN, key and signature
information plus (extended) key usage
popup/
popup.html Popup structure; states run through data-view/data-status on
<body>, dynamic values through data-field
popup.css Styling, colours throughout as CSS variables (light/dark)
popup.js Preparation and rendering of the certificate data, tabs,
settings menu and tooltips
i18n.js Runtime translations (DE/EN) for the popup interface
theme.js Applies the chosen theme before the first paint
_locales/{de,en}/ Only for the manifest description (see below)
icons/ Icons for the normal and the error state
Part of the repository but not of the add-on: web-ext-config.cjs (keeps the
store texts and itself out of the package), store-listing.md (texts for the
AMO listing) and the German README.
Rendering and assessment stay in the popup
background.js and the parser emit only stable identifiers — error codes, algorithm slugs, OIDs — never finished prose. Translation and interpretation happen in the popup. Otherwise the manually chosen language could no longer be applied.
Two localization paths
_locales/ exists solely for manifest.description, which Firefox reads before any script runs. The popup interface deliberately does not use browser.i18n.getMessage(): that API always resolves against the browser UI language and cannot be overridden at runtime, which would make the manual language selector useless. The popup's translations therefore live in popup/i18n.js.
Permissions
| Permission | Purpose |
|---|---|
webRequest |
Access to getSecurityInfo() when the response headers arrive |
webRequestBlocking |
Required for getSecurityInfo() to return the certificate |
storage |
Stores the chosen language |
clipboardWrite |
Copies the report or the PEM to the clipboard |
<all_urls> |
Certificate inspection on arbitrary pages |
No data is collected or transmitted (data_collection_permissions: none). The extension makes no network requests of its own; it only reads along with what the browser fetches anyway. All certificate data stays in the browser's memory and is discarded when the tab closes. The chosen theme lives in the popup's local localStorage.
License
Author
Marco Appoldt — dev@appoldt.de