SoapUI fails to connect HTTPS (SSLPeerUnverifiedException)
Ok, the fix for this problem is to set
-Djsse.enableSNIExtension=false
in $SOAPUI_HOME/bin/soapui.bat
The reason is described in this answer: https://stackoverflow.com/a/14884941/1639556
Digest:
Java 7 introduced SNI support which is enabled by default. I have found out that certain misconfigured servers send an "Unrecognized Name" warning in the SSL handshake which is ignored by most clients... except for Java.
Update: for SoapUI 5.2.1 I had to alter a file SoapUI-5.2.1.vmoptions
because modifying bat
file did not help.
I think that you're doing the things good. If you load the server certificate on your truststore the connection must works, maybe something is happening like for example a redirect. If you want you can try to disable the SSL server certificate validation. If you use a SOAPUI standalone version edit the $SOAPUI_HOME/bin/soapui.bat
or $SOAPUI_HOME/bin/soapui.sh
and add this parameter -Dcom.sun.net.ssl.checkRevocation=false
as java option:
soapui.bat
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.net.ssl.checkRevocation=false
soapui.sh
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.net.ssl.checkRevocation=false"
Hope this helps,
For anybody using a Mac looking for the same answer (sorry, it won't let me comment on the selected answer as I don't have enough reputation points yet to Comment !!!). Editing soapui.sh won't have any impact if you are launching the App by clicking the icon in your Applications folder or using Spotlight.
/Applications/SoapUI-5.0.0.app/Contents
Edit vmoptions.txt and add -Dcom.sun.net.ssl.checkRevocation=false to the bottom of the file.. Save and re-launch.