Closed ryanbuening closed 5 years ago
Sounds like keytool appends a little message after the signature algorithm in the keytool output. I'm not sure if that's a Java 8 thing or what. I don't have a MD5withRSA keystore on hand to test.
Temporary workaround would be to just build your app from the command line using appc run
(or ti build
) and pass in --sigalg MD5withRSA
to override the signature algorithm detected by keytool.
A more permanent fix would be to update the createSignedApk()
function to strip off anything after the first instance of whitespace.
https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_build.js#L4632
const sigalg = (this.sigalg || this.keystoreAlias.sigalg || 'MD5withRSA').split(' ')[0],
@jquick-axway what do you think?
Yes, I'm pretty sure Oracle has been appending " (weak)" to the returned "MD5withRSA" algorithm since JDK 8. You can see it in their release notes below if you search for "(weak)". https://www.java.com/en/download/faq/release_changes.xml
@cb1kenobi - Something like below?
appc run -p android -T dist-playstore [-K <KEYSTORE_FILE> -P <KEYSTORE_PASSWORD> -L <KEYSTORE_ALIAS> -O <OUTPUT_DIRECTORY>]
appc run -p android -T dist-playstore -K ~/android.keystore -P secret -L foo -O ./dist/
@ryanbuening You would need to also pass in the --sigalg
like this:
appc run -p android -T dist-playstore -K ~/android.keystore -P secret -L foo -O ./dist/ --sigalg MD5withRSA
@ryanbuening , thanks for bringing this issue to our attention. We've written up a bug report for it below. https://jira.appcelerator.org/browse/TIMOB-26895
Thanks guys. I'm using the appc run
command as a workaround for now.
Describe the bug
To Reproduce
Expected behavior Expected the app to be signed. I haven't had issues in the past.
Environment Titanium SDK version: 7.5.1 GA CLI version: 5.1.1
Logs: