react-native-secure-key-store
react-native-secure-key-store copied to clipboard
not working on api level 22
log
02-22 17:34:07.991 5287-5363/com.medium.wallet.blockey W/System.err: java.lang.IllegalStateException: Can't generate certificate
at android.security.AndroidKeyPairGenerator.generateKeyPair(AndroidKeyPairGenerator.java:136)
at java.security.KeyPairGenerator$KeyPairGeneratorImpl.generateKeyPair(KeyPairGenerator.java:276)
at com.reactlibrary.securekeystore.RNSecureKeyStoreModule.getOrCreatePublicKey(RNSecureKeyStoreModule.java:87)
at com.reactlibrary.securekeystore.RNSecureKeyStoreModule.getOrCreateSecretKey(RNSecureKeyStoreModule.java:129)
at com.reactlibrary.securekeystore.RNSecureKeyStoreModule.setCipherText(RNSecureKeyStoreModule.java:140)
at com.reactlibrary.securekeystore.RNSecureKeyStoreModule.set(RNSecureKeyStoreModule.java:58)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.UnsupportedOperationException: private exponent cannot be extracted
at com.android.org.conscrypt.OpenSSLRSAPrivateKey.getPrivateExponent(OpenSSLRSAPrivateKey.java:161)
at org.bouncycastle.jcajce.provider.asymmetric.rsa.RSAUtil.generatePrivateKeyParameter(Unknown Source)
at org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi.engineInitSign(Unknown Source)
@Bang9 are you getting the same error on the actual device also?
@Bang9 are you getting the same error on the actual device also?
@pradeep1991singh I don't have real device that has api level 22 , so I can't test
Im having the same issue on api level 22 as well - testing on an actual device