Tengo un caso de uso similar, que es permitir que Tomcat 7 use estrictamente solo TLSv1.2, no recurrir a protocolos SSL anteriores como TLSv1.1 o SSLv3.
Estoy usando: C: \ apache-tomcat-7.0.64-64bit y C: \ Java64 \ jdk1.8.0_60.
Siguiendo estas instrucciones: https://tomcat.apache.org/tomcat-7.0-doc/security-howto.html . Tomcat es relativamente sencillo de configurar el soporte SSL.
De muchas referencias probé muchas combinaciones, finalmente encontré 1 que obligará a Tomcat 7 a aceptar solo TLSv1.2. 2 lugares necesarios para tocar:
1) En C: \ apache-tomcat-7.0.64-64bit \ conf \ server.xml
<Connector port="8443"
protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="ssl/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="SSL" sslEnabledProtocols="TLSv1.2" />
dónde
keystoreFile = almacén de confianza autofirmado local
org.apache.coyote.http11.Http11Protocol = Implementación JSSE BIO.
No utilizamos org.apache.coyote.http11.Http11AprProtocol, ya que funciona con openssl. El openssl subyacente recurrirá para admitir protocolos SSL anteriores.
2) Cuando inicie Tomcat, habilite los siguientes parámetros del entorno.
set JAVA_HOME=C:\Java64\jdk1.8.0_60
set PATH=%PATH%;C:\Java64\jdk1.8.0_60\bin
set CATALINA_HOME=C:\apache-tomcat-7.0.64-64bit
set JAVA_OPTS=-Djdk.tls.client.protocols="TLSv1.2" -Dsun.security.ssl.allowUnsafeRenegotiation=false -Dhttps.protocols="TLSv1.2"
Se requiere la restricción JAVA_OPTS; de lo contrario, Tomcat (que funciona con Java8) recurrirá a los protocolos SSL anteriores.
Poner en marcha Tomcat C:\apache-tomcat-7.0.64-64bit\bin\startup.bat
Podemos ver que JAVA_OPTS aparece en el registro de inicio de Tomcat.
Oct 16, 2015 4:10:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djdk.tls.client.protocols=TLSv1.2
Oct 16, 2015 4:10:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dsun.security.ssl.allowUnsafeRenegotiation=false
Oct 16, 2015 4:10:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttps.protocols=TLSv1.2
Entonces, podemos usar el comando openssl para verificar nuestra configuración. Primero conecte localhost: 8443 con el protocolo TLSv1.1. Tomcat se niega a responder con el certificado del servidor.
C:\OpenSSL-Win32\bin>openssl s_client -connect localhost:8443 -tls1_1
Loading 'screen' into random state - done
CONNECTED(000001C0)
5372:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:.\ssl\s3_pkt.c:362:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 0 bytes
Conecte localhost: 8443 con el protocolo TLSv1.2, Tomcat responde ServerHello con el certificado:
C:\OpenSSL-Win32\bin>openssl s_client -connect localhost:8443 -tls1_2
Loading 'screen' into random state - done
CONNECTED(000001C0)
depth=1 C = US, ST = Washington, L = Seattle, O = getaCert - www.getacert.com
verify error:num=19:self signed certificate in certificate chain
---
Certificate chain
0 s:/C=SG/ST=SG/L=Singapore/O=Xxxx/OU=Development/CN=Myself
i:/C=US/ST=Washington/L=Seattle/O=getaCert - www.getacert.com
1 s:/C=US/ST=Washington/L=Seattle/O=getaCert - www.getacert.com
i:/C=US/ST=Washington/L=Seattle/O=getaCert - www.getacert.com
---
Server certificate
-----BEGIN CERTIFICATE-----
(ignored)
-----END CERTIFICATE-----
subject=/C=SG/ST=SG/L=Singapore/O=Xxxx/OU=Development/CN=Myself
issuer=/C=US/ST=Washington/L=Seattle/O=getaCert - www.getacert.com
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 2367 bytes and written 443 bytes
Esto demuestra que Tomcat ahora responde estrictamente solo a la solicitud TLSv1.2.