Skip to content

Remove jarsigner timestamp from keystore check#928

Open
XeduR wants to merge 1 commit into
coronalabs:masterfrom
XeduR:android-timestamp-removal
Open

Remove jarsigner timestamp from keystore check#928
XeduR wants to merge 1 commit into
coronalabs:masterfrom
XeduR:android-timestamp-removal

Conversation

@XeduR

@XeduR XeduR commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Solar2D's Android keystore credential check (ListKeyStore::AreKeyStoreAndAliasPasswordsValid) runs jarsigner with a hardcoded -tsa http://timestamp.digicert.com to sign a throwaway _coronatest.jar, purely to confirm the keystore and alias passwords are valid. The timestamp serves no purpose and the signed jar is discarded immediately.

The real APK/AAB is signed by Gradle with no timestamp authority configured at all. Android and Google Play do not require a signature timestamp. The only effect of the flag is to add a network round-trip to DigiCert to an otherwise fully offline password check, and when that host is unreachable (due to connection issues, geoblocking, etc.) the check fails and the Simulator reports a misleading "The password for the alias was not valid, or the Java JDK was not found."

This PR removes the -tsa argument from both jarsigner command strings (the Mac/Linux and Windows branches). jarsigner signs fine without it (it prints a "no timestamp" warning and still exits 0), so a valid keystore still validates and a wrong password still fails. The shipped artifact is unchanged because it was never timestamped to begin with. The change also deletes a dead #if 0 block in AndroidAppBuildController.mm that held a superseded inline copy of the same check.

I have tested this on Solar2D Simulator on Windows and it works as intended.


Changes:

  • Drop the hardcoded -tsa http://timestamp.digicert.com from both jarsigner commands in the Android keystore credential check, making the check fully offline
  • Fixes the misleading "password not valid, or JDK not found" failure when the timestamp host is unreachable. The test jar is discarded anyway and Gradle already signs the real APK/AAB with no timestamp, so shipped apps are unaffected
  • Remove the dead #if 0 jarsigner block in AndroidAppBuildController.mm (a superseded inline copy of the same check)

- Drop the hardcoded `-tsa http://timestamp.digicert.com` from both jarsigner commands in the Android keystore credential check, making the check fully offline
- Fixes the misleading "password not valid, or JDK not found" failure when the timestamp host is unreachable. The test jar is discarded anyway and Gradle already signs the real APK/AAB with no timestamp, so shipped apps are unaffected
- Remove the dead `#if 0` jarsigner block in AndroidAppBuildController.mm (a superseded inline copy of the same check)
@XeduR
XeduR requested a review from Shchvova as a code owner June 29, 2026 15:16
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