-
Notifications
You must be signed in to change notification settings - Fork 97
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
Failing data connection with STARTTLS (Explicit TLS): tls session not reused #49
Comments
Did you have a look at : #30 |
Yes i have seen #30 and even tried the recommended fix. But this does not help. I think this is a different issue. Here the EPSV-Mode is not a problem, the above mentioned error exists also with PASV-Mode. |
I found some details on tls session reusage here https://security.stackexchange.com/a/183135:
So RFC5077 seems to be applicable here (https://tools.ietf.org/html/rfc5077). It would be great if anybody has some hints how we could implement this in go... |
Go already supports session tickets via the standard library crypto/tls package. It looks like you need to set |
Same issue here as well. I tried the ClientSessionCache trick with a size of 32 and 0 and the FTPS server still complain It seems TLS has 2 ways to avoid renegociating SSL on every request:
The catch is Golang doesn't seem to support the session based mechanism: FiloSottile/go@2a38c62. I hope I an wrong somewhere and that my understanding of TLS simply isn't good enough 🤞 |
@muirdm well, i was using this configuration The issue is, that the ssl session for the data channel should be the same as the established session for the control channel.
|
To answer the first question, i just checked with the source code from FileZilla Server (see AsyncSslSocketLayer.cpp, around Line 1259) which uses OpenSSL under the hood. It seems to support both session cache variants. So i guess it should work indeed also with session tickets... |
I can confirm, that session resumption with FileZilla Server is working, because as mentioned above, FileZilla Server supports session tickets, while ProFTPD (at least in Version 1.3.5b, default in Debian Stretch) does not... |
Hello. Current attempts i've tried as suggested: The error i get is specifically when attempting to upload/download anything wich causes the creation of a data connection:
Have there been any updates on this? I really would like to avoid having to disable SSL session reuse on the server. |
I think setting the cache to size zero is the key.
|
No issue, golang tls lib handle SessionTickets automatically. The
Tested with Filezilla Server and go1.17.3. Working for me. |
Thank you LitixThomas We were dealing with this problem for two days When we set ServerName and ClientSessionCache, it just worked smoothly 👌 Thank you very much for this great advice |
I was trying many times, finally, |
When trying to connect to ftp servers with STARTTLS (Explicit TLS) the data connection will fail with common ftp server configurations, because the tls session is not reused on the client.
Error-Message on client:
425-Unable to build data connection: Operation not permitted
Error-Message on server:
client did not reuse SSL session, rejecting data connection
Btw. this is no firewall issue: a plain connection (without encryption) works fine.
Also the data connection works, if i change the ftp server configuration (here ProFTPD) and add
TLSOptions NoSessionReuseRequired
.But this does not solve my problem, since I want to use goftp to connect to remote servers and the above configuration flag is uncommon. So i think the ssl session resuage should be solved in goftp client code.
Client log:
Server log (ProFTPD):
The text was updated successfully, but these errors were encountered: