Reputation: 31
I get the following output from CURL when attempting to fetch a WSDL from a SOAP web service on the command line (this is being used to test basic connectivity).
Server specific info has been redacted because it belongs to a vendor. The vendor say they have not had any similar reports from other users.
curl -v WEB-SERVICE-URL Hostname was NOT found in DNS cache
Trying WEB-SERVICE-HOST-IP...
Connected to WEB-SERVICE-HOST-NAME (WEB-SERVICE-HOST-IP) port 443 (#0)
successfully set certificate verify locations:
CAfile: none
CApath: /etc/ssl/certs
SSLv3, TLS handshake, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS alert, Server hello (2):
error:1408D172:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature type
Closing connection 0
curl: (35) error:1408D172:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature type
I am running this command from a Ubuntu 14.04 box, curl and openssl version info below.
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtmp rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
The error appears to be fairly obscure, googling it finds very few results.
The curl command works on Ubuntu 14.04 if I specify the the --tlsv1.1
option, so the problem appears to be TLSv1.2 specific (It also works on Ubuntu 13.04 without that option because it defaults to TLSv1.1).
I have also tested accessing the WSDL through SoapUI and this works on Ubuntu 14.04, I guess this works because SoapUI is Java and isn't using Openssl?. Because of that and TLSv1.1 working I don't believe the issue is caused by firewalls or proxies.
TLSv1.2 also seems to be the default for the PHP SoapClient, when loading it with the WSDL I am getting failed to load external entity
errors which I assume are caused by the same problem as the curl call.
If I could find a way to force SoapClient to use TLSv1.1 then that would be a valid work around, however it appears you can only do this by creating a stream context with specific ciphers enabled, I have attempted this but with no luck so far.
The other alternatives are to implement a Soap integration that either avoids Openssl, or allows me to specify the TLS version.
Since 14.04 is an LTS I would expect this work and if the problem is with Openssl I would like to get to the bottom of it, anybody have any ideas?.
Edit
Using s_client I get slightly more information in the error message.
139860433102496:error:1408D172:SSL routines:SSL3_GET_KEY_EXCHANGE:wrong signature type:s3_clnt.c:1765:
This indicates the error is being thrown here in the openssl code.
Edit 2
The Cipher used (successfully) by SoapUI is
TLS_DHE_RSA_WITH_AES_128_CBC_SHA, looking at the result of
openssl ciphers
I can't see the equivalent cipher.
Edit 3
The following command openssl s_client -tls1_2 -cipher DHE-RSA-AES128-SHA -prexit -connect
produces output which ends with the following.
New, (NONE), Cipher is (NONE)
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID: 3ED4F6AB3EAD9BAD50059F9881951D2A759DC10FA1108B3107EA3374CC4922EE
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1430373464
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Upvotes: 0
Views: 5477
Reputation: 31
Answering just for completeness, TLSv1.2 started working the next day after I raised it with the vendor, they later confirmed it was server side problem.
Upvotes: 1