cURL / Mailing Lists / curl-library / Single Mail

curl-library

problems with ftps (using libcurl)

From: Luiz Rafael Culik Guimaraes <luiz_at_xharbour.com.br>
Date: Tue, 13 Sep 2005 19:10:57 -0300

Dear Friends

I'm trying to do an ftps

but when i try to upload an file i has problems

my proftpd 1.3.0r2 configuration is
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
DebugLevel 10
ExtendedLog /var/log/proftpd.log
# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30

# Set the user and group under which the server will run.
#User nobody
#Group nogroup
User proftpd
Group proftpd

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
  User ftp
  Group ftp

  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients 10

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin welcome.msg
  DisplayFirstChdir .message

  # Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE>
# DenyAll
 # </Limit>
</Anonymous>
DefaultRoot /envia

#<IfModule mod_tls.c>
    TLSEngine on
    TLSLog /var/ftpd/tls.log
    TLSProtocol TLSv1
    TLSProtocol SSLv23

    # Are clients required to use FTP over TLS when talking to this server?
    TLSRequired no

    # Server's certificate
     TLSRSACertificateFile /etc/ftpd/server.crt
     TLSRSACertificateKeyFile /etc/ftpd/server.key.unsecure

# CA the server trusts
    TLSCACertificateFile /etc/ftpd/ca.crt

    # Authenticate clients that want to use FTP over TLS?
    TLSVerifyClient no
 # </IfModule>

here my logs for the ftps transaction
proftpd.log
localhost UNKNOWN proftpd [13/Sep/2005:18:15:31 -0300] "AUTH TLS" - -
localhost UNKNOWN proftpd [13/Sep/2005:18:15:31 -0300] "USER rafael" 331 -
localhost UNKNOWN rafael [13/Sep/2005:18:15:31 -0300] "PASS (hidden)" 230 -
localhost UNKNOWN rafael [13/Sep/2005:18:15:31 -0300] "PBSZ 0" 200 -
localhost UNKNOWN rafael [13/Sep/2005:18:15:31 -0300] "PROT P" 200 -
localhost UNKNOWN rafael [13/Sep/2005:18:15:31 -0300] "PWD" 257 -
localhost UNKNOWN rafael [13/Sep/2005:18:15:31 -0300] "PASV" 227 -

tls.log
Sep 13 18:15:31 mod_tls/2.1[8543]: TLS/TLS-C requested, starting TLS
handshake
Sep 13 18:15:31 mod_tls/2.1[8543]: TLSv1/SSLv3 connection accepted, using
cipher DHE-RSA-AES256-SHA (256 bits)
Sep 13 18:15:31 mod_tls/2.1[8543]: Client: C = BR, ST = Rio Grande do Sul, L
= Sao Lepoldo, O = xHarbour brasil, OU = xharbour, CN = rafael, emailAddress
= luiz_at_xharbour.com.br
Sep 13 18:15:31 mod_tls/2.1[8543]: Protection set to Private
Sep 13 18:20:26 mod_tls/2.1[8543]: SSL_shutdown() error: (unknown)

and my ftpsession log
* About to connect() to localhost port 21
* Trying 127.0.0.1... * connected
* Connected to localhost (127.0.0.1) port 21
< 220 ProFTPD 1.3.0rc2 Server (ProFTPD Default Installation)
[::ffff:127.0.0.1]
> AUTH TLS
< 234 AUTH TLS successful
* successfully set certificate verify locations:
* CAfile: /etc/ftpd/ca.crt
  CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: /C=BR/ST=Rio Grande do Sul/L=Sao Lepoldo/O=xHarbour
brasil/OU=xharbour/CN=localhost/emailAddress=luiz_at_xharbour.com.br
* start date: 2005-09-13 15:02:22 GMT
* expire date: 2010-09-12 15:02:22 GMT
* common name: localhost (matched)
* issuer: /C=BR/ST=Rio Grande do Sul/L=Sao Leopoldo/O=xHarbour
brasil/OU=xharbour/CN=localhost/emailAddress=luiz_at_xharbour.com.br
* SSL certificate verify ok.
> USER rafael
< 331 Password required for rafael.
> PASS kl6qaxv9
< 230 User rafael logged in.
> PBSZ 0
< 200 PBSZ 0 successful
> PROT P
< 200 Protection set to Private
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (127,0,0,1,4,52).
* Trying 127.0.0.1... * connected
* Connecting to 127.0.0.1 (127.0.0.1) port 1076
* Doing the SSL/TLS handshake on the data stream
* successfully set certificate verify locations:
* CAfile: /etc/ftpd/ca.crt
  CApath: none
* SSL re-using session ID
* SSL connection timeout
* Uploaded unaligned file size (0 out of 577736430605250560 bytes)
* Closing connection #0

Can some one help

Regards
Luiz Rafael Culik Guimaraes
www.xharbour.com.br
Received on 2005-09-14