RESTMock icon indicating copy to clipboard operation
RESTMock copied to clipboard

Crash with proguard

Open bmesing opened this issue 5 years ago • 1 comments

Hi, the REST-Mock crashes when proguard obfuscation is applied and HTTPS is enabled. Here is the stacktrace: 2020-05-08 14:19:07.799 13382-13475/xxx E/AndroidRuntime: FATAL EXCEPTION: pool-10-thread-1 Process: xxx, PID: 13382 java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.security.PublicKey.getAlgorithm()' on a null object reference at java.security.KeyStore$PrivateKeyEntry.(KeyStore.java:576) at java.security.KeyStore$PrivateKeyEntry.(KeyStore.java:526) at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:485) at java.security.KeyStore.getEntry(KeyStore.java:1560) at com.android.org.conscrypt.KeyManagerImpl.(KeyManagerImpl.java:72) at com.android.org.conscrypt.KeyManagerFactoryImpl.engineGetKeyManagers(KeyManagerFactoryImpl.java:115) at javax.net.ssl.KeyManagerFactory.getKeyManagers(KeyManagerFactory.java:305)

According to this article the reason may be, that a deprecated version of spongycastle code to generate a self signed certificate is used: http://quabr.com:8182/59848764/how-to-fix-proguard-removes-java-security-code

Regards Benjamin

bmesing avatar May 08 '20 13:05 bmesing

thanks @bmesing for reporting this, I'll take a look into it

andrzejchm avatar Jun 03 '20 10:06 andrzejchm