Android 支付宝相关问题

错误日志:

java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
     at org.apache.harmony.xnet.provider.jsse.OpenSSLRSAKeyFactory.engineGeneratePrivate(OpenSSLRSAKeyFactory.java:77)
     at java.security.KeyFactory.generatePrivate(KeyFactory.java:186)
     at com.vkoov.alipay.Rsa.sign(Unknown Source)
     at com.vkoov.hyzq.ChongZhiListSubActivity.sign(Unknown Source)
     at com.vkoov.hyzq.ChongZhiListSubActivity.czAlipay(Unknown Source)
     at com.vkoov.hyzq.ChongZhiListSubActivity.access$1(Unknown Source)
     at com.vkoov.hyzq.ChongZhiListSubActivity$4.onItemClick(Unknown Source)
     at android.widget.AdapterView.performItemClick(AdapterView.java:308)
     at android.widget.AbsListView.performItemClick(AbsListView.java:1148)
     at android.widget.AbsListView$PerformClick.run(AbsListView.java:2835)
     at android.widget.AbsListView$1.run(AbsListView.java:3594)
     at android.os.Handler.handleCallback(Handler.java:800)
     at android.os.Handler.dispatchMessage(Handler.java:100)
     at android.os.Looper.loop(Looper.java:194)
     at android.app.ActivityThread.main(ActivityThread.java:5371)
     at java.lang.reflect.Method.invokeNative(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:525)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
     at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_PKCS8_PRIV_KEY_INFO(Native Method)
     at org.apache.harmony.xnet.provider.jsse.OpenSSLRSAKeyFactory.engineGeneratePrivate(OpenSSLRSAKeyFactory.java:73)
     ... 19 more

错误的原因:

证书中的秘钥有问题

你可能感兴趣的:(Android 支付宝相关问题)