Curl не может подключиться к неявному FTP через TLS на CentOS 7

Я пытаюсь подключиться к неявному FTP через TLS, но он завершается с ошибкой NSS -5938 (PR_END_OF_FILE_ERROR). Я использую последнюю версию Centos 7. Я могу подключиться с помощью curl по умолчанию в дистрибутиве ubuntu, но безуспешно с помощью centos 7

Вот вывод

[ramorim@dev]$ curl --user user:pass ftps://ftp.example.com.br/ -l -v -k
* About to connect() to ftp.example.com.br port 990 (#0)
*   Trying 209.10.xxx.xx...
* Connected to ftp.example.com.br (209.10.xxx.xx) port 990 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*       subject: E=networkadminsbz@example.com.br,OU=example,O=example,L=São Paulo,ST=São Paulo,C=55,CN=ftps@example.com.br
*       start date: Nov 08 19:50:42 2016 GMT
*       expire date: Nov 08 19:50:42 2017 GMT
*       common name: ftps@example.com.br
*       issuer: E=networkadminsbz@example.com.br,OU=example,O=example,L=São Paulo,ST=São Paulo,C=55,CN=ftps@example.com.br
< 220-FileZilla Server 0.9.59 beta
< 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
< 220 Please visit https://filezilla-project.org/
> USER user
< 331 Password required for user
> PASS xxxxx
< 230 Logged on
> PBSZ 0
< 200 PBSZ=0
> PROT P
< 200 Protection level set to P
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> EPSV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 229 Entering Extended Passive Mode (|||20105|)
*   Trying 209.10.xxx.xx...
* Connecting to 209.10.xxx.xx (209.10.xxx.xx) port 20105
* Connected to ftp.example.com.br (209.10.xxx.xx) port 990 (#0)
> TYPE A
< 200 Type set to A
> NLST
< 150 Opening data channel for directory listing of "/"
* Maxdownload = -1
* Doing the SSL/TLS handshake on the data stream
* skipping SSL peer certificate verification
* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
* Failure sending ABOR command: SSL connect error
* Closing connection 0
curl: (35) Encountered end of file

Установленные версии

[ramorim@dev]$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[ramorim@dev]$ curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.19.1 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz 
0
задан 11 May 2017 в 22:37
1 ответ

Я перекомпилировал curl с помощью openssl или gnutls, и это решает мою проблему.

yum install gnutls gnutls-devel libssh2 libssh2-devel
wget https://curl.haxx.se/download/curl-7.54.0.tar.gz
tar -xvzf curl-7.54.0.tar.gz && cd curl-7.54.0/
./configure --with-gnutls --with-libssh2 --prefix=/usr/local
make
make install
rm /usr/bin/curl
ln -s /usr/local/bin/curl /usr/bin/curl
1
ответ дан 4 December 2019 в 16:15

Теги

Похожие вопросы