mission-improbable icon indicating copy to clipboard operation
mission-improbable copied to clipboard

VeritySigner.java does not support passwords on keys

Open micahflee opened this issue 7 years ago • 3 comments

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.

micahflee avatar Nov 20 '16 20:11 micahflee

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.

micahflee avatar Nov 21 '16 00:11 micahflee

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

patcon avatar Nov 21 '16 00:11 patcon

Ok, I have disabled the password prompt on key generation. I figure we'll leave this open for the VeritySigner.java fix.

mikeperry-tor avatar Nov 21 '16 21:11 mikeperry-tor