具体加载方式如下:
java.security.KeyStore keyStore = KeyStore.getInstance("PKCS12");
String certContent = cert.getCert("xxx");
try (InputStream inputStream = org.apache.commons.io.IOUtils.toInputStream(certContent,
StandardCharsets.UTF_8);) {
keyStore.load(inputStream, "xxx".toCharArray());
}
解决了么,我也碰到了这个问题