JDK8을 사용하여 TLS를 테스트하기위한 테스트 코드 (HTTPS 아님)를 작성합니다. 테스트 코드를 실행하면, 나는 검사하고 다음과 같은 결과를 얻을 nmap이 도구를 사용변경 소스 코드없이 TLSv1을 어떻게 비활성화 할 수 있습니까?
D:\softwares\nmap-7.12>nmap -p xxxx --script=ssl* x.x.x.x --unprivileged
Starting Nmap 7.12 ( https://nmap.org ) at 2016-07-26 15:33 °?′óà????÷2?±ê×?ê±??
Nmap scan report for x.x.x.x
Host is up (1.0s latency).
PORT STATE SERVICE
xxxx/tcp open unknown
| ssl-enum-ciphers:
| TLSv1.0:
| ciphers:
| TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) -A
| compressors:
| NULL
| cipher preference: indeterminate
| cipher preference error: Too few ciphers supported
| TLSv1.1:
| ciphers:
| TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) -A
| compressors:
| NULL
| cipher preference: indeterminate
| cipher preference error: Too few ciphers supported
| TLSv1.2:
| ciphers:
| TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) -A
| compressors:
| NULL
| cipher preference: indeterminate
| cipher preference error: Too few ciphers supported
|_ least strength: A
MAC Address: xx:xx:xx:xx:xx:xx
Nmap done: 1 IP address (1 host up) scanned in 3.88 seconds
D:\softwares\nmap-7.12>
JDK8 기본적으로 TLSv1.0 수 있습니다,하지만 난 그것을 사용하지 않으려는.
https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJSSE_Protocols
내가 호출
Protocols
The SunJSSE provider supports the following protocol parameters:
Protocol Enabled by Default for Client Enabled by Default for Server
SSLv3 No(Unavailable Footnote 2) No(Unavailable Footnote 2)
TLSv1 Yes Yes
TLSv1.1 Yes Yes
TLSv1.2 Yes Yes
내 테스트 코드에 javax.net.ssl.SSLEngine 클래스의 "할까는, setEnabledProtocols"방법은 TLSv1.0 완벽하게 해제 할 수 있습니다. 변경 코드없이 TLSv1.0을 비활성화하는 방법이 있습니까? 예 : 구성 파일을 통해.
I는 다음과 같은 여러 가지 방법을 시도했지만 아무도 원하는 효과 :(
1 -Djdk.tls.client.protocols = TLSv1.1, TLSv1.2
-Ddeployment.security.TLSv1 = 2를 얻을 수 없다 거짓 여기 는 자바 버전 :
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
주의 할의 위험 부담,'-D' 것이다 *'jdk.tls에 대한하지 * 일 .disabledAlgorithms', 당신이 제안한대로'java.security' 파일에 들어가야합니다. – kubanczyk