A MikroTik hotspot’s captive portal stops opening on Android 13 only. It works on iOS, it works on Android 15. The certificate was issued a few months ago, it is neither expired nor revoked, and openssl on the laptop says “OK” for the whole chain. Yet those phones refuse the HTTPS login page. This is the chronicle — facts in hand — of how we found out why before touching production, using our dojo.trust library.
It’s the natural sequel to the two articles on certificate trust: the note on certificates, CAs and the chain of trust and the howto on real HTTPS on MikroTik with Let’s Encrypt. Here we look at the side almost nobody considers: a certificate is never valid “in the absolute” — it is valid relative to whoever verifies it.
Act 1 — The symptom
Typical setup: phone → MikroTik hotspot over HTTPS → redirect to an external system (HTTPS again) for the login. The portal at hotspot.exampledomain.com would not open on Android 13: a certificate error on the login page. On Android 15, smooth. On iOS, same. The certificate had been issued by Sectigo a few months earlier: not expired, not revoked, apparently perfect. A symptom that doesn’t add up: if the certificate is valid, why one device yes and the other no?
Act 2 — The openssl check from the Mac: “all OK”
First reflex, openssl s_client from the operator’s MacBook. Output (faithful extract, domain masked):
$ openssl s_client -connect hotspot.exampledomain.com:443 \
-servername hotspot.exampledomain.com -showcerts </dev/null
depth=2 C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication Root R46
verify return:1
depth=1 C=GB, O=Sectigo Limited, CN=Sectigo Public Server Authentication CA DV R36
verify return:1
depth=0 CN=hotspot.exampledomain.com
verify return:1
---
Certificate chain
0 s:CN=hotspot.exampledomain.com
i:CN=Sectigo Public Server Authentication CA DV R36
a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Mar 5 00:00:00 2026 GMT; NotAfter: Mar 5 23:59:59 2027 GMT
1 s:CN=Sectigo Public Server Authentication CA DV R36
i:CN=Sectigo Public Server Authentication Root R46
a:PKEY: RSA, 3072 (bit); sigalg: sha384WithRSAEncryption
---
Verification: OK
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Verify return code: 0 (ok)
The leaf was in order all the way: RSA 2048, one-year validity (2026-03-05 → 2027-03-05), SAN hotspot.exampledomain.com + www.hotspot.exampledomain.com, 3 embedded SCTs (Certificate Transparency), SHA-256 signature. The Mac verified the whole chain up to the Sectigo Public Server Authentication Root R46 and said OK. The contradiction lives right there.
Act 3 — “Valid” doesn’t mean “trusted by that device”
The keystone: a certificate is trusted relative to the trust store of the system verifying it. Every OS — and every version of an OS — has its own list of roots. openssl on the Mac verifies against the Mac’s store: it answers “does this Mac trust it?”, not “does Android 13 trust it?”. Two different questions.
dojo.trust verifies a chain against the exact store of one OS version, at a chosen date. The dataset’s stores hold the SHA-256 fingerprints of the roots; for Android they are the AOSP stores tagged per release (android-13.0.0_r1 and friends). Root R46 was downloaded from the official Sectigo repository (via the intermediate’s AIA) and looked up by fingerprint:
SHA-256 root R46:
7BB647A62AEEAC88BF257AA522D01FFEA395E0AB45C73F93F65654EC38F25A06
Present and trusted ONLY in android-15 (of the 10 Android stores in the dataset, 7.0 → 15).
Absent in android-14 and earlier, android-13 included (129 roots).
On the Apple side, the same root enters the stores from iOS 17.4 / macOS 14.4 onward: the operator’s Mac, up to date, contains it — which is why openssl said OK. Google added it to the AOSP base only with Android 15: different timelines for different vendors. The library’s verdict on the Sectigo chain, at the check date:
verify_chain(sectigo_chain, "store/android-13.json", at="2026-11-18")
-> android-13 @ 2026-11-18 : NOT-TRUSTED
reason: no path to a store root (anchor still missing)
verify_chain(sectigo_chain, "store/android-15.json", at="2026-11-18")
-> android-15 @ 2026-11-18 : TRUSTED
To rule out signature or expiry problems, a cross-check with openssl verify -CAfile root-r46.pem -untrusted intermediate.pem leaf.pem → OK: the crypto was fine (RSA SHA-256 on the leaf, SHA-384 on the intermediate). The only thing missing was the anchor in the Android 13 store. The field symptom was explained to the byte: 13 no, 15 yes.
Act 4 — The alternatives, verified before touching production
This is the practical value: with dojo.trust you test the alternative chains without changing anything in production and waiting to see.
- Let’s Encrypt. LE chain served live those days: leaf →
YR1→ Root YR → ISRG Root X1 (cross-sign). X1 is present in theandroid-13store → verdict TRUSTED (full path up to X1). Onandroid-7.0instead NOT-TRUSTED: X1 isn’t there yet. - Sectigo, legacy hierarchy. Intermediate “Sectigo RSA Domain Validation Secure Server CA” → root USERTrust RSA Certification Authority (valid until 2038). USERTrust is present and trusted in every store from
android-7.0toandroid-15→ TRUSTED on 13 too, with the widest coverage on older devices.
Act 5 — The field change: Sectigo → Let’s Encrypt
The operator replaced the Sectigo certificate with a Let’s Encrypt one, loading CRT, KEY and intermediate in the hotspot’s certificate panel. Reported outcome: “it all came up” — the portal opens again on Android 13 too. Independent verification the same day: the server now serves
0 s:CN=hotspot.exampledomain.com i:C=US, O=Let's Encrypt, CN=YR1
1 s:C=US, O=Let's Encrypt, CN=YR1 i:C=US, O=ISRG, CN=Root YR
2 s:C=US, O=ISRG, CN=Root YR i:O=Internet Security Research Group, CN=ISRG Root X1
Verification: OK — TLSv1.3, TLS_AES_256_GCM_SHA384
And dojo.trust confirms the full matrix (date 2026-11-18):
| Chain | Android 7.0 | Android 13 | Android 15 |
|---|---|---|---|
| Old Sectigo (root R46) | NOT-TRUSTED | NOT-TRUSTED | TRUSTED |
| New LE (root X1) | NOT-TRUSTED | TRUSTED | TRUSTED |
The “old Sectigo” row replicates the symptom exactly (13 no, 15 yes); the “new LE” row replicates the field fix exactly. Not an argument: a measurement, checked against reality.
Act 5b — The alternative that keeps Sectigo
Changing CA wasn’t the only road. The certificate (leaf) and its key could have stayed the same: what decides the verdict is only the chain the server presents — the bundle of intermediate CAs. The client doesn’t look for just any root, it looks for a root it already has in its own store; and Android 13, while it lacks R46, does have USERTrust RSA Certification Authority since android-7.0. The Sectigo hierarchy is cross-signed exactly for this: the same link can climb to the old, ubiquitous USERTrust instead of to the new R46.
And here is the answer to the natural question — “do you just add a root into the intermediate?”. Yes, but in its cross-signed form, i.e. served as an intermediate certificate, not as a self-signed root. A self-signed root stuffed into the bundle the server sends changes nothing: a root is an anchor only if it sits in the client’s store; the one the server ships is discarded. The cross-signed version instead — same subject, but issued by an older CA (USERTrust) — is a fully valid intermediate, and it extends the path up to an anchor Android 13 actually owns.
Chain anchored at USERTrust (Sectigo "legacy" variant):
0 leaf hotspot.exampledomain.com (same certificate, same key)
1 Sectigo intermediate -> issued by USERTrust RSA (cross-signed link)
2 USERTrust RSA -> anchor PRESENT in the android-13 store
verify_chain(usertrust_chain, "store/android-13.json", at="2026-11-18")
-> android-13 : TRUSTED
-> android-7.0 : TRUSTED (USERTrust has always been there)
In practice, on the hotspot’s certificate panel you would have reloaded the same CRT + KEY, changing only the intermediate file to the one that climbs up to USERTrust (Sectigo publishes it in its repository, crt.sectigo.com). No reissue, no new key — and coverage even wider than the new LE: USERTrust is trusted from android-7.0 upward, where Let’s Encrypt (root X1) doesn’t reach pure 7.0.
One detail to always verify: this route holds only if the link signing the leaf really has the cross-signature toward the older root — here it exists (USERTrust RSA, itself cross-signed also by “AAA Certificate Services” for even older devices). And it’s best to serve the full cross-signed chain, without relying on the client’s automatic intermediate fetch (AIA), which on a captive portal often doesn’t fire. So why did the operator move to Let’s Encrypt anyway? For convenience: automatic issuance and renewal via ACME, not because Sectigo couldn’t work. We trust certificate panels will one day make it more obvious which chain variant you are loading; with dojo.trust, meanwhile, you test it beforehand — not after.
Honest interlude — a false alarm during the debug
While testing the ECDSA chains, a first test seemed to show unverifiable signatures: suspected library bug. It was instead a mistake by whoever wrote the test — verify_signature(leaf, YR1) with the arguments swapped (the signature wants (issuer, child), the signer first). With the right order the ECDSA P-384 verification passes. No bug in dojo.trust 0.1.0. A good lesson beyond this case: when a “weird” check shows up, re-read the call before blaming the tool.
How you do it
The library is Python, zero external dependencies, MIT licensed. The heart is a single function:
from dojo.trust import verify_chain
verify_chain(chain_pem, "store/android-13.json", at="2026-11-18",
extra_roots=root_pem, purpose="leaf")
Two usage notes that came straight out of this chronicle:
- the JSON stores hold fingerprints only: when the root isn’t in the chain the server serves, use
extra_rootsand pass its PEM to close the path (that’s the design: the store says “who is trusted”,extra_rootsprovides the bytes); verify_signature/ecdsa_verifywant(issuer, child), not the other way around.
The library, with the per-version store dataset, is here:
It is installed from the dojo repository, reserved for those in the dojo: join for free.
Bonus — and what does RouterOS trust? (enter dojo.npk)
So far the verifiers were phones and Macs. But there’s one we always forget: RouterOS itself, when it acts as a TLS client — the ACME client that must trust the Let’s Encrypt server, /tool fetch check-certificate=yes, e-mail sending, the cloud. What does it trust? No need to guess: the store is inside the firmware. Enter the family’s second library, dojo.npk, which opens the .npk package, verifies its digest and extracts the squashfs filesystem; the embedded roots are then fingerprinted by dojo.trust.
from dojo.npk import Npk
fw = Npk.load("routeros-7.25.npk") # verifies the digest, opens the firmware squashfs
# -> the factory root CAs, extracted from the firmware and fingerprinted with dojo.trust:
RouterOS 7.25 (system, build 2026-10-22) — 27 factory root CAs:
Amazon Root CA 1
DigiCert (Assured ID CA/G2/G3, Global CA/G2/G3, High Assurance EV,
TLS ECC P384 G5, TLS RSA4096 G5, Trusted Root G4) [10]
GlobalSign (Root CA/R46/E46 + 3 variants) [6]
Go Daddy Root G2
ISRG Root X1, ISRG Root X2 (Let's Encrypt)
Sectigo Public Server Auth Root R46, E46
SSL.com Root ECC
USERTrust RSA, USERTrust ECC
GSMA RSP2 Root CI1, OISTE GSMA CI G1 (eSIM / SIM profiles)
Sectigo R46 : 7BB647A6... <- the SAME one from our case
USERTrust RSA : E793C9B0...
ISRG Root X1 : 96BCEC06...
And here’s the tie that closes the loop: among those 27 there is Sectigo R46 itself (7BB647A6…, the same fingerprint as the appendix), together with USERTrust RSA and ISRG Root X1. So the router trusted R46 just fine: it was the Android 13 phone that didn’t have it in its store. Same certificate, two verifiers, two answers — the article’s thesis, now seen from the router’s side.
RouterOS’s store is small and curated, and it changes with the version — measured on the firmware, not inferred: up to and including 7.16 (and across all of 6.x) there is no factory store at all (the router as a client trusted no root: CAs had to be imported by hand); it appears in the 7.1x line and evolves, e.g. between 7.22 and 7.25 a Go Daddy Class 2 root left and SSL.com Root ECC came in. Practical consequence: a certificate issued by a CA outside those ~27 is not trusted by RouterOS as a client (ACME, fetch, e-mail), even if every modern phone accepts it. With the same verify_chain — changing only the store — dojo.trust tests RouterOS’s trust store too, version by version, not just the phones’. We trust the router will one day expose its own root list from the command line as well; meanwhile, you read it from the firmware.
It is installed from the dojo repository, reserved for those in the dojo: join for free.
Caveats — so we don’t claim more than we verified
- The dataset’s Android stores are the AOSP base per release tag. From Android 14 the trust store is updatable via Mainline/Conscrypt (APEX
com.android.conscrypt): an updated device may behave differently from the base. The “13 NOT-TRUSTED” verdict is the factory base, consistent with the real symptom observed. - Let’s Encrypt does not cover pure Android 7.0 (X1 absent): for that scenario the legacy Sectigo/USERTrust hierarchy would have been the widest option. The hotspot’s real device fleet (13+) is covered by LE.
- The field symptom and the change’s outcome are reported by the operator; the chains (old and new) were re-verified live and the matrix verdicts are measured with dojo.trust, not inferred.
Technical appendix
SHA-256 fingerprints of the roots involved (public infrastructure):
root Sectigo R46 : 7BB647A62AEEAC88BF257AA522D01FFEA395E0AB45C73F93F65654EC38F25A06
root ISRG X1 : 96BCEC06264976F37460779ACF28C5A7CFE8A3C0AAE11A8FFCEE05C0BDDF08C6
root USERTrust RSA : E793C9B02FD8AA13E21C31228ACCB08119643B749C898964B1746D46C3D4CBD2
Commands used, in reproducible form:
openssl s_client -connect HOST:443 -servername HOST -showcerts
openssl verify -CAfile root.pem -untrusted intermediate.pem leaf.pem
Sources: Sectigo certificate repository (crt.sectigo.com), AOSP stores (android.googlesource.com/platform/system/ca-certificates), live Let’s Encrypt chain and root X1 from letsencrypt.org. All verification code is dojo.trust’s own.
In one line: “the certificate is valid” and “that phone trusts it” are two different statements, and only the second one opens the portal. We trust everyday command-line tools will one day make it more obvious which store they verify against; meanwhile, checking the chain against the right store — before swapping the certificate in production — costs two lines of Python and saves an afternoon of guessing.



