有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Tomcat7启用tlsv1。1使用APR连接器

这是我的环境: Ubuntu 12.04 Sun JRE 1.7.0_60 Tomcat 7.0.26 Openssl 1.0.1-4ubuntu5。15 libssl1。0.01.0.1-4ubuntu5。十五

目前,我的tomcat服务器接受TLSv1连接,我正在尝试更新配置以支持TLSv1。1连接也是如此。以下是我当前的连接器配置is服务器。xml

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLSv1" acceptCount="100"
               disableUploadTimeout="true" enableLookups="false"
               SSLCertificateFile="/opt/certs/cert.pem"
               SSLCertificateKeyFile="/opt/certs/private-key.pem"
               SSLCACertificateFile="/opt/certs/cert.pem"
               server="Apache"
               ciphers="TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA" />

我尝试将TLSv1更改为TLSv1。1但这似乎并不能解决问题。 下面是运行以下命令的输出

openssl s_client -connect ip_address:443 -tls1_1 -msg

CONNECTED(00000003)
>>> TLS 1.1  [length 00dc]
    01 00 00 d8 03 02 53 aa 16 c1 84 4a 2d a1 8b 54
    e9 10 85 dd 30 66 c6 d8 41 0c 57 38 fa 59 95 6c
    82 e7 dc 6f ac bb 00 00 66 c0 14 c0 0a c0 22 c0
    21 00 39 00 38 00 88 00 87 c0 0f c0 05 00 35 00
    84 c0 12 c0 08 c0 1c c0 1b 00 16 00 13 c0 0d c0
    03 00 0a c0 13 c0 09 c0 1f c0 1e 00 33 00 32 00
    9a 00 99 00 45 00 44 c0 0e c0 04 00 2f 00 96 00
    41 c0 11 c0 07 c0 0c c0 02 00 05 00 04 00 15 00
    12 00 09 00 14 00 11 00 08 00 06 00 03 00 ff 01
    00 00 49 00 0b 00 04 03 00 01 02 00 0a 00 34 00
    32 00 0e 00 0d 00 19 00 0b 00 0c 00 18 00 09 00
    0a 00 16 00 17 00 08 00 06 00 07 00 14 00 15 00
    04 00 05 00 12 00 13 00 01 00 02 00 03 00 0f 00
    10 00 11 00 23 00 00 00 0f 00 01 01
>>> TLS 1.0 Alert [length 0002], fatal protocol_version
    02 46
139739825112736:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:337:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 7 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.1
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1403655873
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

即使我将sslProtocols更改为TLSv1,TLSv1连接仍然可以工作。1.我看过tomcat的文档,它没有提到任何关于TLSv1的内容。1在APR连接器中,是否可以这样做,或者我必须使用其他连接器


共 (1) 个答案

  1. # 1 楼答案

    根据tomcat aprssl page,您可能还需要将sslEnabledProtocols值填充到TLSv1.1