我对这一切都很陌生:但我试图实现以下目标:
所以现在我的Tomcat(JDK默认)密钥库包含:
但是当我用openssl联系我的主机时:只有原始的自签证书(见下面的测试和输出)。
Tomcat如何决定在SSL握手中返回哪个证书路径? 是不是硬编码寻找有主题的证书?tomcat'还是什么?
我使用的是JDK 1.6,使用的是JSSE,而不是Tomcat的APR选项。
TEST仅显示原始的自签名证书,而不是证书链,包括CA.
openssl s_client -connect myhost:443 -showcerts
给出:
CONNECTED(00000003)
depth=0 /C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
verify return:1
---
Certificate chain
0 s:/C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
i:/C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
-----BEGIN CERTIFICATE-----
MIIDFjCCAtOgAwIBAgIEVAHmITALBgcqhkjOOAQDBQAwbjELMAkGA1UEBhMCYWkx
DDAKBgNVBAgTA2FsbDEYMBYGA1UEBxMPdmlydHVhbHdvcmxkb25lMRIwEAYDVQQK
Ewljb21wdXRlcnMxEjAQBgNVBAsTCWFwcHNlcnZlcjEPMA0GA1UEAxMGdG9tY2F0
MB4XDTE0MDgzMDE0NTYzM1oXDTE0MTEyODE0NTYzM1owbjELMAkGA1UEBhMCYWkx
DDAKBgNVBAgTA2FsbDEYMBYGA1UEBxMPdmlydHVhbHdvcmxkb25lMRIwEAYDVQQK
Ewljb21wdXRlcnMxEjAQBgNVBAsTCWFwcHNlcnZlcjEPMA0GA1UEAxMGdG9tY2F0
MIIBtzCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9E
AMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f
6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv
8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtc
NrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwky
jMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/h
WuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYQAAoGARLJHatLfQCV7HKKW9h4/sGPHHwK7
iGs6wEXeGBlE4J2NDpFJKe5yetWeHDTPCnW50ljZZiZ43jhO1kZyV27dBl/udA+z
xXessJnev5ureJCWrK8CEqKKnU8VneF7EcegjNQpJ85M4yhHW0G5J49wYZtFhDnq
EP5cRrUM6YflenAwCwYHKoZIzjgEAwUAAzAAMC0CFQCIuTbUq36Kq7lRMIy15Lt0
W+8AXgIUeepTbUyDcsU0nV/OYYIfuPVT2yM=
-----END CERTIFICATE-----
---
Server certificate
subject=/C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
issuer=/C=ai/ST=all/L=virtualworldone/O=computers/OU=appserver/CN=tomcat
---
No client certificate CA names sent
---
SSL handshake has read 1284 bytes and written 276 bytes
---
New, TLSv1/SSLv3, Cipher is EDH-DSS-DES-CBC3-SHA
Server public key is 1024 bit
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : EDH-DSS-DES-CBC3-SHA
Session-ID: 540204AA630D80A7000E9AEC0AE738E6F0FCCC9EAE1D64F69956BCDFFADAC23A
Session-ID-ctx:
Master-Key: 338FCE3A028B2E8DFBF57F99609A6056973FB3D62722C192DF52F38B5A1FFDDAF79AD52327C18E7D99C226D34918D646
Key-Arg : None
Start Time: 1409418410
Timeout : 300 (sec)