JETTY 9.1.2根据文档不起作用的SSL配置



使用Jetty 9.1.2和[1]中的文档,我正在使用openSSL遵循步骤,但无法使SSL工作。

我按照链接运行以下步骤:

我在Jetty文件夹中,Debian7。

cd etc
rm keystore 
openssl genrsa -des3 -out jetty.key
openssl req -new -x509 -key jetty.key -out jetty.crt
keytool -keystore keystore -import -alias jetty -file jetty.crt -trustcacerts
openssl pkcs12 -inkey jetty.key -in jetty.crt -export -out jetty.pkcs12
keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destkeystore keystore

cd..

然后根据[1],它说将此XML添加到Jetty-Https.xml中,但在哪里?

<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
  <Set name="KeyStorePath"><Property name="jetty.home" default="." />/etc/keystore</Set>
  <Set name="KeyStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
  <Set name="KeyManagerPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
  <Set name="TrustStorePath"><Property name="jetty.home" default="." />/etc/keystore</Set>
  <Set name="TrustStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
</New>

我还添加了ETC/JETTY-HTTPS.xml到start.ini

java -jar start.jar 

错误:jetty-https.xml java.lang.reflect.invocation targetException

文档中是否缺少一些东西?什么是在HTTPS上工作的新码头的完整设置?

[1] http://www.eclipse.org/jetty/documentation/current/corrent/configuring-ssl.html#loading-loading-keys-and-certificates

文档也未提及以下以下内容,将以下内容添加到jetty_home/start.ini:

# ---------------------------------------
# Module: ssl
--module=ssl
# ---------------------------------------
# Module: https
--module=https

...没有哪个jetty忽略了您刚刚手工编码/复制的所有配置;是JKS。

我知道您的码头专家正在滚动您的眼睛,但这是SSL配置的一部分,应该真正包含在"启用SSL"文档中,因为我们这些人无法通过互联网阅读开发人员的思想的人。

最新更新