login about faq

I would like to use TLS to login, but then turn it off after that for both the control channel and the data channel. I tried this:

ftp.Hostname = hostName;
ftp.Username = userName;
ftp.Password = password;
ftp.AuthTls = true;

ftpResult = ftp.Connect();
LogFtpResponse(ftpResult);

ftp.ClearControlChannel();
ftp.DataProtection = "clear";

The first command after that was to GetCurrentRemoteDir, and it failed:

ChilkatLog:
  GetCurrentRemoteDir:
    DllDate: Sep 25 2016
    ChilkatVersion: 9.5.0.60
    UnlockPrefix: <removed>
    Architecture: Little Endian; 32-bit
    Language: .NET 4.6
    VerboseLogging: 0
    pwd:
      simpleCommand:
        sendCommand:
          prepControlChannel:
            unexpectedResponse: [=15=03=01=00 =0B=FCQ}=16=92=AA=A1=94=9B=A2=94=BBeT=9B]n}u=B7=1B*=F7Nz=AB=9C=C2*=FF6]
          --prepControlChannel
          sendingCommand: PWD
        --sendCommand
        readCommandResponse:
          Failed to read FTP control channel reply.
          readFtpReply: Socket operation timeout.
          receivedStrQP: [=15WD=00 =8CC=CD=E7   =F7bs=8F=1E=F0=0D4=DCX=A2=18=99;=C5E=05=B9a=DC=B97.E=11=B1@]
        --readCommandResponse
      --simpleCommand
    --pwd
    Failed.
  --GetCurrentRemoteDir
--ChilkatLog

It looks like there is a mismatch between what the client expects in terms of encrypted versus non-encrypted text.

So...

What is the recommended way to achieve TLS for the authentication only, then no encryption for all further traffic on both the control and data channels? Is it possible?

asked Oct 07 at 15:13

JohnnyCee's gravatar image

JohnnyCee
3

edited Oct 07 at 17:17


I'll have to give this a test. However, make sure to check the return value of ClearControlChannel. If it failed, then examine the LastErrorText.

link

answered Oct 07 at 19:34

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×131
×31
×6

Asked: Oct 07 at 15:13

Seen: 143 times

Last updated: Oct 07 at 19:34

powered by OSQA