Skip to content

fix(tls): re-add GlobalSign Root CA R1 for Cloudflare HTTPS - #79

Merged
clabeuhtegrite merged 1 commit into
mainfrom
fix/ca-bundle-globalsign-r1
Jun 8, 2026
Merged

fix(tls): re-add GlobalSign Root CA R1 for Cloudflare HTTPS#79
clabeuhtegrite merged 1 commit into
mainfrom
fix/ca-bundle-globalsign-r1

Conversation

@clabeuhtegrite

Copy link
Copy Markdown
Owner

Fix: Cloudflare HTTPS TLS validation (GlobalSign Root CA R1)

The device couldn't verify Bambuddy's TLS certificate when reached over HTTPS through Cloudflare (with a CF Access service token) — esp_crt_bundle: Failed to verify certificate — while the same request from a laptop succeeded.

Root cause: Cloudflare's Google-issued edge cert chains leaf -> GTS WE1 -> GTS Root R4 -> GlobalSign Root CA (R1). Mozilla dropped the 1998 GlobalSign Root CA (R1) from its trust store, so the CI-built bundle lost it. esp_crt_bundle matches a trust anchor by the served chain's top issuer (R1), not the self-signed GTS Root R4 that is in the Mozilla set — so it had nothing to match.

Fix: scripts/gen_ca_bundle.sh re-appends GlobalSign Root CA R1 (self-signed, valid to 2028-01-28; DER SHA-256 verified at build time) before gen_crt_bundle.py.

Verified from a laptop: openssl s_client -CAfile <R1> validates the live bambuddy.adrienburaud.fr chain (Verify return code: 0). On-device serial confirmation follows after the OTA.

🤖 Generated with Claude Code

Reaching Bambuddy over HTTPS through Cloudflare (with a CF Access service token)
left the device offline: esp_crt_bundle couldn't verify the certificate
("Failed to verify certificate" / chain too long), though the same request
worked from a laptop. Cloudflare's Google-issued edge certs chain

    leaf -> GTS WE1 -> GTS Root R4 -> GlobalSign Root CA (R1)

and Mozilla dropped the 1998 GlobalSign Root CA (R1) from its set, so the
CI-built bundle lost it. esp_crt_bundle matches a trust anchor by the served
chain's TOP issuer (R1) — not the self-signed GTS Root R4 that IS in the Mozilla
set — so it had nothing to match.

gen_ca_bundle.sh now appends GlobalSign Root CA R1 (self-signed, valid to
2028-01-28) before gen_crt_bundle.py, and refuses to build if the embedded
cert's DER SHA-256 doesn't match the pinned value.

Verified from a laptop: openssl s_client -CAfile <globalsign-r1> validates
bambuddy.adrienburaud.fr's live chain (Verify return code: 0). On-device
confirmation to follow over serial after the OTA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@clabeuhtegrite
clabeuhtegrite merged commit 14f7322 into main Jun 8, 2026
5 checks passed
@clabeuhtegrite
clabeuhtegrite deleted the fix/ca-bundle-globalsign-r1 branch June 8, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant