0

Im suddenly unable to manually sign my application.

It used to work until now.

The only thing I remember changing is android studio to version 2.3.2

I'm getting this error:

jarsigner error: java.lang.RuntimeException: certificate exception: Unable to initialize, java.io.IOException: DerInputStream.getLength(): Redundant length bytes found

This is the command that I run:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my_keystore.keystore some-unsigned.apk alias

I tried to refer this post: PKCS#12 : DerInputStream.getLength() exception

but unfortunately I'm getting a different exception

No idea what to do

Thanks in advance

Community
  • 1
  • 1
dor506
  • 5,246
  • 9
  • 44
  • 79
  • Possible duplicate of [PKCS#12 : DerInputStream.getLength() exception](http://stackoverflow.com/questions/7399154/pkcs12-derinputstream-getlength-exception) – Zoe May 21 '17 at 11:01
  • refer http://stackoverflow.com/questions/7399154/pkcs12-derinputstream-getlength-exception – sasikumar May 21 '17 at 11:01
  • @LunarWatcher I don't see how it related to my problem as I'm getting a different exception – dor506 May 21 '17 at 11:13

1 Answers1

1

Well, I found the solution

The problem is the version of java that installed.

It seems like that there is a problem (at least for me...) with the newest version of java (at that moment of writing: 8u131)

I tried that on another mac which has 8u101 version and it worked, so I downgraded it on my mac and it worked either.

In case it helps anyone...

dor506
  • 5,246
  • 9
  • 44
  • 79