-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session reuse with different port #458
Comments
We can look at adding support. Do you have an idea about how the API should work to access this feature? Note that BCJSSE does provide an extended API so you can contemplate features that aren't in the JSSE API itself, although relying on them of course creates a dependency. Please also describe the workaround that you are using with the Oracle JRE. |
We use the Apache commons net FTPSClient to connect to a FileZilla server. The workaround for Oracle JRE uses the method „prepareDataSocket“ (FTPSClient) that was implemented by Apache to make this workaround possible. It takes the SSLSessionContext from the current SSLSession. Then it adds the current key (host and port) to the sessionHostPortCache. For an API idea: So my idea is to add the option bindSessionToPort(boolean) to the provider. Example use: |
Is this issue being worked on, the possibilities discussed or is it paused? |
Hi @Stefan4112 have you been able to handle this? |
I still use the reflection workaround in standard Java. I have no idea how to implement it with BouncyCastle myself. The current workaround in Java can be found here. For situations where the workaround is not possible I do a OpenSSL command call. |
If you are happy to use the BCJSSE extension API, then for the first connection collect the session like so (after connected):
Then when initialising the second connection, you can configure it to reuse this exact session like so (before connecting):
The same methods exist also for |
Correct me if I'm wrong but the last suggestion (with |
We have a problem with our FTP client implementation and TLS session resumption required by some servers, for example FileZilla server that has it enabled by default. This option requires the client to use the same TLS session in the data session and control session. That means different ports for two connections and same TLS session.
For more information you can look up the common message "TLS session of data connection has not resumed or the session does not match the control connection".
We tried Oracle Java at first and found a workaround. But the workaround does not work with IBM i, were our client will run. Now we tried BouncyCastle as a SSLContext provider. Unfortunately the feature is not supported either.
Will TLS session reuse on different ports be supported?
The text was updated successfully, but these errors were encountered: