1、${KARAF_HOME}\etc\jetty.xml
<New id="sslContextFactory" class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="KeyStore">D:\log\ca\tomcat.keystore</Set>
<Set name="KeyStorePassword">852258</Set>
<Set name="KeyManagerPassword">852258</Set>
<Set name="TrustStore">D:\log\ca\tomcat.truststore</Set>
<Set name="TrustStorePassword">852258</Set>
</New>
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Arg><Ref id="sslContextFactory" /></Arg>
<Set name="Port">8443</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="AcceptQueueSize">100</Set>
</New>
</Arg>
</Call>
2、证书文件用keytool生成 keytool -genkey -alias tomcat -keyalg RSA -keysize 1024 -validity 36500 -keystore tomcat.keystore
/**名字与姓氏要与服务器的ip或域名相同,其他项可以为空(直接回车)
**/
keytool -export -alias tomcat -keystore tomcat.keystore -file tomcat.crt
keytool -import -alias tomcat -file tomcat.crt -keystore tomcat.truststore
3、进入karaf控制台${karaf_host}/system/console/configMgr
打开Pax Web Runtime进行相关设置,
HTTP Secure enabled=true,其他默认就可以