tananaev / passport-reader

e-Passport NFC Reader Android app
326 stars 126 forks source link

Unexpected security exception #35

Closed viktasidenfy closed 3 years ago

viktasidenfy commented 3 years ago

Hey, I have a problem with running my app in release mode. With minifyEnabled true I get an exception: java.lang.IllegalStateException: Unexpected security exception during initialization, with cause: java.security.NoSuchAlgorithmException: no such algorithm: ISO9797Alg3Mac for provider BC Do you know how to address this issue? Thanks in advance

ErsinDemirbas commented 3 years ago

Same issue did you solve this problem?

viktasidenfy commented 3 years ago

Add this to your proguard rules: -keep class org.jmrtd.** { *; } -keep class net.sf.scuba.** {*;} -keep class org.bouncycastle.** {*;} -keep class org.ejbca.** {*;}

ErsinDemirbas commented 3 years ago

I solved it thanks to you. I ran into problems when I put the application in realese mode and solved it thanks to you. Also thanks for the quick reply, I wish you a very nice day.

Note: I'm sure this line of code will help a lot of people in the future.