Questions tagged «jks»

15
如何在Java密钥库中导入现有的X.509证书和私钥以在SSL中使用?
我在ActiveMQ配置中有这个: <sslContext> <sslContext keyStore="file:/home/alex/work/amq/broker.ks" keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts" trustStorePassword="password"/> </sslContext> 我有一对X.509证书和一个密钥文件。 如何导入这两个以便在SSL和SSL + stomp连接器中使用它们?我可以用google搜索的所有示例始终都会自己生成密钥,但是我已经有了密钥。 我努力了 keytool -import -keystore ./broker.ks -file mycert.crt 但这只会导入证书而不是密钥文件,并导致 2009-05-25 13:16:24,270 [localhost:61612] ERROR TransportConnector - Could not accept connection : No available certificate or key corresponds to the SSL cipher suites which are enabled. 我尝试串联证书和密钥,但得到了相同的结果。 如何导入密钥?
228 java  ssl  jms  activemq  jks 

3
.keystore文件和.jks文件之间的区别
我试图找到.keystore文件和.jks文件之间的区别,但找不到。我知道jks是针对“ Java密钥库”的,两者都是一种存储键/值对的方法。 有什么不同或偏爱使用一种而不是另一种?
226 keystore  jks 

5
原因:java.security.UnrecoverableKeyException:无法恢复密钥
我提供了一个名为ABCC_client.store的jks密钥库。当我将此密钥库导入到cacerts并尝试连接时,提示没有此类算法错误。PFA堆栈跟踪 Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) at java.security.Provider$Service.newInstance(Provider.java:1245) at sun.security.jca.GetInstance.getInstance(GetInstance.java:220) at sun.security.jca.GetInstance.getInstance(GetInstance.java:147) at javax.net.ssl.SSLContext.getInstance(SSLContext.java:125) at javax.net.ssl.SSLContext.getDefault(SSLContext.java:68) at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:102) at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79) ... 32 more Caused by: java.security.UnrecoverableKeyException: Cannot recover key at sun.security.provider.KeyProtector.recover(KeyProtector.java:311) at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:121) at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:38) at java.security.KeyStore.getKey(KeyStore.java:763) at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:113) at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:48) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.