Open jeremywadsack opened 9 years ago
Ok, here's some more information. I get this when an error occurs during login. In this case a "certificate verify failed" error:
connect: ftp.secureftp-test.com, 21
get: 220 Microsoft FTP Service
put: AUTH TLS
get: 234 AUTH command ok. Expecting TLS Negotiation.
OpenSSL::SSL::SSLError
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
If I add the following before the call to close
then it works.
ftps.send :decorate_socket, ftps.instance_variable_get(:@sock)
The issue is that the failure happens when the socket attempts to connect. But decorate
isn't called until after the socket is connected.
For some reason, #closed?
returns false for a connection that has never opened.
I'm getting the same thing.
I started to look at this a few months ago. Unfortunately, the public ftp site upon which this gem depends for it's tests is no more. If I get a chance I'll see if my ftpd or some other ruby ftp lib. can be used to create a new test suite. Ftpd uses this gem in its own tests, but not at runtime, so it ought to be ok, mostly, even if it is a little bit "close" of a relationship between the two. Either that, or we get lucky and find another public ftp server that has ssl support. On Sep 26, 2015 18:05, "Jamon Holmgren" notifications@github.com wrote:
I'm getting the same thing.
— Reply to this email directly or view it on GitHub https://github.com/bnix/double-bag-ftps/issues/9#issuecomment-143508824.
Thanks @wconrad! No rush.
Every time I try to close the connection (after an error state) I get this error.
Here is example code that reproduces the above error:
This seems to be happening in the
close
method of Net::FTP:I can't determine what
DoubleBagFTPS
is doing to cause this, but it doesn't happen if I switch toNet::FTP
.