1
我成功创建了我保存到位于“C:\ test \ myKeystore.bks”中的myKeystore.bks文件。 如何在我的应用程序中导入此密钥库以完成握手?在我的应用程序中导入密钥库
InputStream in = context.getResources().openRawResource(R.raw.mykeystore);
我有以下从Antoine`s博客代码其中指出:“现在你可以将密钥存储复制的原始资源的资源下,Android应用程式/生/”
private SSLSocketFactory newSslSocketFactory() {
try {
// Get an instance of the Bouncy Castle KeyStore format
KeyStore trusted = KeyStore.getInstance("BKS");
// Get the raw resource, which contains the keystore with
// your trusted certificates (root and any intermediate certs)
InputStream in = context.getResources().openRawResource(R.raw.mykeystore);
try {
预先感谢您。