Skip to content

feat: support imported and bundled HTTPS signing CAs - #58

Merged
fython merged 1 commit into
mainfrom
feat/https-signing-ca
Nov 14, 2026
Merged

fython merged 1 commit into
mainfrom
feat/https-signing-ca

Conversation

@fython

@fython fython commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

WheelPlay can now issue HTTPS server certificates for its current LAN/Tesla access IPs and Web hostname using a supplied RSA or EC signing CA, following mitmproxy's CA-loading flow.

  • Add manual CA-chain/private-key import and an optional combined PEM bundled through WHEELPLAY_HTTPS_CA_PEM or .local/https-ca/emudhra-ca.pem. Only the specified file is staged, and removing the configuration clears stale generated assets.
  • Prefer manually imported identities, automatically use the bundled CA on first use, and retain an explicit choice of the default local CA. Source changes reuse HTTPS listener rollback and preserve HTTP pairing.
  • Validate signing material, generate independent server keys, retain issuer SKI/AKI and validity bounds, refresh certificates when access settings change, and expose the active source in /tls.json.
  • Integrate the import flow with WheelPlayActivity and settings; add translations, documentation, and synthetic-CA tests. No vendor certificate or private key is committed.

Validation on commit 05639ed, based on current main: all 41 targeted tests passed (SigningCaTest, LanTlsTest, LanTlsEcTest, HttpsSettingsUiTest, and WebListenSettingsTest), and :mobile:assembleDebug passed. Localization and git diff --check also pass. Packaging checks verified that the APK contains the exact configured synthetic PEM, excludes unrelated files, and removes the PEM after configuration is cleared.

Real eMudhra material and head-unit behavior have not been tested. Generated leaf certificates last at most seven days and renew on service restart or access-setting changes; there is no scheduled renewal.

@fython
fython force-pushed the feat/https-signing-ca branch from 05639ed to 6e3cd5e Compare November 14, 2026 12:06
Add a mitmproxy-style signing CA pipeline to the local HTTPS server, and feed
it from CI:

- Import a CA chain plus its private key at runtime, or bundle a combined PEM
  at build time through WHEELPLAY_HTTPS_CA_PEM / .local/https-ca/emudhra-ca.pem.
- Provision the bundled CA from the WHEELPLAY_HTTPS_CA_PEM_BASE64 Actions
  secret. Material is written under RUNNER_TEMP, validated against the same
  rules as BundleHttpsCa, and deleted when the step or job ends.
- Default the bundled source to the pinned mitmproxy commit when the secret is
  absent (WHEELPLAY_HTTPS_CA_FALLBACK=mitmproxy), require a CA by default
  (WHEELPLAY_HTTPS_CA_REQUIRED=1), and mark such artifacts with -MITMPROXY-CA.
- Cover both the Release and Debug workflows, with the Debug build exporting
  the CA path through GITHUB_ENV and reusing it from build-signed-android.sh.

Docs: docs/HTTPS_SIGNING_CA.md and docs/RELEASE_SIGNING.md.
@fython
fython force-pushed the feat/https-signing-ca branch from 6e3cd5e to 73fb737 Compare November 14, 2026 12:10
@fython
fython merged commit 3754523 into main Nov 14, 2026
3 checks passed
@fython
fython deleted the feat/https-signing-ca branch November 14, 2026 12:28
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