更新时间:2022-11-05 22:07:53
KeystorePath应该指向一个Keystore,而不是一个简单的证书。 Android默认情况下使用KeystoreType BKS,因此您应该创建一个并将证书导入其中,如 http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/
The KeystorePath should point to a Keystore, not a simple certificate. Android uses KeystoreType BKS by default, so you should create one and import your certificate into it as described by http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/
keytool -importcert -v -trustcacerts -file "path_to_cert/interm_ca.cer" -alias IntermediateCA -keystore "res/raw/myKeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "path_to_bouncycastle/bcprov-jdk16-145.jar" -storetype BKS -storepass mysecret
你可以如果你不想要的话,也可以使用Portecle( http://portecle.sourceforge.net/ )乱用命令行。
You can also do this using Portecle (http://portecle.sourceforge.net/), if you don't want to mess with the command line.
让我们在Android上进行加密使java.security.cert.CertPathValidatorException:找不到证书路径的信任锚
java.security.cert.CertPathValidatorException:找不到证书路径的信任锚。 Android 2.3
java.security.cert.CertPathValidatorException:找不到证书路径的信任锚.在api上少24
javax.net.ssl.SSLHandshakeException:找不到证书路径信任锚:java.security.cert.CertPathValidatorException
javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:未找到证书路径的信任锚