【发布时间】:2014-09-02 08:39:18
【问题描述】:
我想创建需要客户端提供证书的嵌入式 https 服务器,我正在使用这个: http://www.smartjava.org/content/embedded-jetty-client-certificates
现在我的问题是,鉴于我的码头已嵌入,我如何为我的代码提供密钥库和信任库文件。 我的意思是代码中的这些行:
// the keystore (with one key) we'll use to make the connection with the
// broker
private final static String KEYSTORE_LOCATION = "src/main/resources/client_keystore.jks";
private final static String KEYSTORE_PASS = "secret";
// the truststore we use for our server. This keystore should contain all the keys
// that are allowed to make a connection to the server
private final static String TRUSTSTORE_LOCATION = "src/main/resources/truststore.jks";
private final static String TRUSTSTORE_PASS = "secret";
谢谢
【问题讨论】:
标签: java jetty embedded-jetty