2017-10-25 20 views
0

以下の出力を参照してください。私は、RedHat Enterprise Server 6.9のcurl 7.52.1を使ってウェブサイトにアクセスしようとしています。RedHatでcurlを使用しているときのSSLプロトコルエラーが不明です

[[email protected] ~]# curl -v https://testweb.dms.com 

* Rebuilt URL to: https://testweb.dms.com/ 
* Trying 12.121.156.219... 
* TCP_NODELAY set 
* Connected to testweb.dms.com (12.121.156.219) port 443 (#0) 
* ALPN, offering http/1.1 
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH 
* successfully set certificate verify locations: 
* CAfile: /root/anaconda3/ssl/cacert.pem 
    CApath: none 
* TLSv1.2 (OUT), TLS header, Certificate Status (22): 
* TLSv1.2 (OUT), TLS handshake, Client hello (1): 
* Unknown SSL protocol error in connection to testweb.dms.com:443 
* Curl_http_done: called premature == 1 
* Closing connection 0 
curl: (35) Unknown SSL protocol error in connection to testweb.dms.com:443 

opensslが正常に動作します。

[[email protected] ~]# openssl s_client -connect testweb.dms.com:443 
CONNECTED(00000003) 
write:errno=104 
--- 
no peer certificate available 
--- 
No client certificate CA names sent 
--- 
SSL handshake has read 0 bytes and written 307 bytes 
--- 
New, (NONE), Cipher is (NONE) 
Secure Renegotiation IS NOT supported 
Compression: NONE 
Expansion: NONE 
No ALPN negotiated 
SSL-Session: 
    Protocol : TLSv1.2 
    Cipher : 0000 
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg : None 
    PSK identity: None 
    PSK identity hint: None 
    SRP username: None 
    Start Time: 1508957433 
    Timeout : 300 (sec) 
    Verify return code: 0 (ok) 
--- 

カール-V O/Pなし-rootユーザーとして

curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy 

私はこの問題を解決するにはどうすればよい

[[email protected] ~]$ curl -v https://testweb.dms.com 
* About to connect() to testweb.dms.com 443 (#0) 
* Trying 12.121.156.219... connected 
* Connected to testweb.dms.com (12.121.156.219) port 443 (#0) 
* Initializing NSS with certpath: sql:/etc/pki/nssdb 
* CAfile: /etc/pki/tls/certs/ca-bundle.crt 
    CApath: none 
* NSS error -5961 
* Closing connection #0 
* SSL connect error 
curl: (35) SSL connect error 

+0

あなたは-qv HTTPSをカール '試すことができます:// testweb.dms.com'? 'curl -V'出力を追加しますか? – randomir

+0

curl -qvは同じo/pを返します。 curl -vが追加されました。 – Techie

+1

'/ root/anaconda3/ssl/cacert.pem'を目的に設定していますか?非rootユーザーとしてcurlを実行しようとしましたか? – randomir

答えて

1

特定のプロトコルまたは暗号スーツを使用して接続してください。 curlで提供されたプロトコルがサーバーによって受け入れられていないようです。

はこれを試してみてください。

curl --tlsv1.2 https://testweb.dms.com 
関連する問題