Re: Problem with SslStream for data connection for FTP



Your validation routine is returning true, but it is also accepting all
certificates.
Now that you have accepted all certificates on your stream, you just need to
validate with the protocol that is in the certificate.
Since you accepted all, just send all protocols to the AuthenticateAsClient

C#
SslStream.AuthenticateAsClient("", null,
System.Security.Authentication.SslProtocols.Ssl2 |
System.Security.Authentication.SslProtocols.Ssl3 |
System.Security.Authentication.SslProtocols.Tls, false);

and you should be fine

<planb@xxxxxxxxxxxxxxx> wrote in message
news:07413061-d2e1-4690-ab67-7951175c75e5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm trying do FTP over SSL and am running into a problem on the data
connection (control connection is working fine).

When logging in I first issue the AUTH TLS command on non-SSL
connection, then create a new SslStream, and use that to
AuthenticateAsClient, that works and then I issue the PBSZ 0 and PROT
P commands before sending the USER/PASS commands.

So far, so good. But when I try to do something that will requires
the data connection, I can't make it...

I issue the PASV command, get the ip and port and use that to create a
TcpClient passing it the ipAddress, port (just as I do when creating
the command connection).

Dim oDataClient As TcpClient = New TcpClient(ipAddress, port)
Dim sslStream As SslStream = New
SslStream(oDataClient.GetStream(), False, cbDelegate, Nothing)

' above works
sslStream.AuthenticateAsClient(ipAddress) ' this hangs

Does anyone have any idea as to why the call to AuthenicateAsClient is
hanging? My validation routine isn't getting called (it currently
does nothing but return true anyway).

--
J. Moreno


.



Relevant Pages

  • RE: Dialin problem
    ... # /etc/ppp/ppp.conf File for dial out modem to ISP and Dial in modem ... # connection to this FBSD system. ... # it's default options profile set to, NO command echo ATE0 and NO ... Edit /etc/ttys to enable a getty on the port where the dialin ...
    (freebsd-questions)
  • Re: VFP Updates?
    ... Try talking ODBC or OleDb and they say HU. ... make up my apps so that what ever they want to run has to be from a command ... kind of connection and assign it the right to do exactly what you want. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: [SLE] Setting up DSL on SUSE 10.1
    ... I won't faint at command line. ... SUSE or Mepis and the non computer oriented PCLinuxOS. ... In some OS's such as MS's the network will be confiured and on. ... on the DSL connection? ...
    (SuSE)
  • Re: More ASP.Net Newbie Questions
    ... The Command is then what you're doing with this connection, ... In regards to your final point, making grids and controls in general do ... > Connection and Recordset objects into, like, 37 different things. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Troubleshooting connection loss (continued)
    ... If that is the problem, the broken connection must be short-lived, ... Run as is and I think it should fail on testing ISP gateway to modem. ... command line starts with a $ so you can tell command linefrom results ... nameserver 0.238.0.12 ...
    (comp.os.linux.networking)