mission-improbable
mission-improbable copied to clipboard
VeritySigner.java does not support passwords on keys
I'm trying to install this on a Nexus 6P. It's successful until it gets to re-sign.sh
, then it throws this error:
/home/user/mission-improbable/extras/verity_signer /tmp/tmppb5e8N.table ../keys/verity.pk8 /tmp/tmpuGp5es.sig
Exception in thread "main" java.lang.NullPointerException
at com.android.verity.Utils.decryptPrivateKey(Utils.java:148)
at com.android.verity.Utils.loadDERPrivateKey(Utils.java:166)
at com.android.verity.VeritySigner.main(VeritySigner.java:64)
I've tried using Oracle's java, as well as java from openjdk-8-jdk in Debian sid, but they both throw the same error.
Just confirmed that the problem is that I was using passphrases on the keys. When I re-run the script, and generate new keys without passphrases, it works fine.
At the very least, we should prob add a check to ensure no password, and fail out if not:
openssl pkcs8 -passin pass:"" -check -in $KEYS_PATH/verity.pk8
Ok, I have disabled the password prompt on key generation. I figure we'll leave this open for the VeritySigner.java fix.