我正在尝试配置与供应商的安全连接,问题是我无法正确配置tomcat。示例:
我使用JVM参数运行一个简单的Java客户端
-Djavax.net.ssl.keyStore=/home/pablo/keystore.jks
-Djavax.net.ssl.keyStorePassword=password
一切正常。
然后,我尝试执行相同的白色tomcat,因此在catalina.sh中将相同的参数放入JAVA_OPT变量。但是不起作用。
可能是这里的问题
http-bio-8080-exec-1, READ: TLSv1.2 Handshake, length = 4
*** ServerHelloDone
Warning: no suitable certificate found - continuing without client authentication
*** Certificate chain
<Empty>
***
tomcat进程像这样运行
/usr/bin/java -Djava.util.logging.config.file=/home/log/apache-tomcat-7.0.88/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djdk.tls.ephemeralDHKeySize=2048 -Djavax.net.ssl.keyStore=/home/pablo/keyStorePim.jks -Djavax.net.ssl.keyStorePassword=password -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4040,server=y,suspend=n -Djavax.net.debug=ssl -Dignore.endorsed.dirs= -classpath /home/pablo/apache-tomcat-7.0.88/bin/bootstrap.jar:/home/pablo/apache-tomcat-7.0.88/bin/tomcat-juli.jar -Dcatalina.base=/home/pablo/apache-tomcat-7.0.88 -Dcatalina.home=/home/pablo/apache-tomcat-7.0.88 -Djava.io.tmpdir=/home/pablo/apache-tomcat-7.0.88/temp org.apache.catalina.startup.Bootstrap start
Java版本:
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
Tomcat版本:
Server version: Apache Tomcat/7.0.88
Server built: May 7 2018 11:12:57 UTC
Server number: 7.0.88.0
OS Name: Linux
OS Version: 4.13.0-39-generic
Architecture: amd64
JVM Version: 1.8.0_171-b11
JVM Vendor: Oracle Corporation