Enabling older protocols (TLSv1, TLSv1.1) #1737
-
Hi folks, I am making a tool for building intercepting proxies called Mallet, with the goal of proxying and intercepting arbitrary protocols. One of the use cases is testing how well clients are verifying server certificates, etc, for which I need to attempt to intercept the TLS comms, and present my own certificates. While I recognise that TLSv1 and TLSv1.1 have officially been deprecated in RFC8996, and SSLv3 long before that, I do still encounter systems in the field that are still using these protocols, and as such, need to support them as far as possible. As such, I have been testing the BouncyCastle libs as a possible way to support protocols that are no longer available in the JRE/JDK. Unfortunately, although I have been following the basic TLSServerExample.java code in the TLSUserGuide.pdf, and added calls to Doing some digging, I discovered
which appears to override the String array of enabled protocols, no matter what I do, whether modifying Is my interpretation correct, and is this intended behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
No, that method is overridden in ProvTlsServer to return the versions specified in the SSLParameters, subject to any algorithm constraints. Those include "jdk.tls.disabledAlgorithms" and "jdk.certpath.disabledAlgorithms" plus any user-specified ones (via SSLParameters). Note that you can't just comment those security properties out (or unset them in code) as we use a default value in that case (which default for jdk.tls.disabledAlgorithms includes early protocol versions). Especially if sSock.getSupportedProtocols definitely includes "TLSv1", the algorithm constraints seems the only way this could be failing (of course our test suite uses basically the same code to test each cipher suite at each supported version). There will be a secondary issue that you need a suitable cipher suite enabled, but in this case the specific alert (protocol_version(70)) is only raised when the server doesn't have any of the client-requested protocols enabled. |
Beta Was this translation helpful? Give feedback.
-
I had assumed the server was raising the exception, but the stack trace shows in fact the client does. Can you see what version the server negotiated (either with wireshark or in the openssl log or in the BCJSSE log if you set the level down to FINE)? |
Beta Was this translation helpful? Give feedback.
-
As a final conclusion, it turns out I was just being an idiot, and not actually trying the native JDK/JRE implementation in the first place. Or stopped trying after failing initially, before correctly configuring the java.security properties. Anyway, I have been able to negotiate my SSLv3/SSL_RSA_EXPORT_WITH_RC4_40_MD5 connections successfully now. Thanks all for contributing. Now the last thing to figure out is how to determine the remote end's supported ciphers when the handshake fails. |
Beta Was this translation helpful? Give feedback.
I had assumed the server was raising the exception, but the stack trace shows in fact the client does. Can you see what version the server negotiated (either with wireshark or in the openssl log or in the BCJSSE log if you set the level down to FINE)?