Thread: SSL and 503 FTP Error :: Socket

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    SSL and 503 FTP Error :: Socket

    Hello.

    I am working on a small socket application that utilizes SSL and FTP protocol.

    The problem is that the server response with error:

    "503 Log in with USER first."

    The SSL is OpenSSL. Here is an overview of the sequence.

    - winsock connect
    - AUTH SSL
    - SSL_connect()
    - handshake is success

    // At this point, everything is send/recv via SSL
    // SSL_send() and SSL_recv()

    - PBSZ 0
    - PROT P
    - USER <username>
    - PASS <password>
    ...
    // All the above are successful
    // Server respond "230 <username> logged in."

    // Every command afterward returns an error
    - SYST

    Basically, every command the program sends, the server would return "503 Log in with USER first."

    Do you need to package outgoing data in a special SSL package before passing it to SSL_send()?

    Please post if you have any idea.

    Thanks,

    Kuphryn

  2. #2
    Sacrajit
    Join Date
    Mar 2005
    Location
    India- Delhi
    Posts
    3
    Hi,
    Being a beginer I dont know much about it but I think you need to initiate a data connection after the SSL connection and send ftp commands to send data to the FTP server

    Thanks

    Sacrajit

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Yeah, stop going round bumping old threads.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed