cancel
Showing results for 
Search instead for 
Did you mean: 

disable Hostname verification in SOAPUI

Not applicable

disable Hostname verification in SOAPUI

Hi,
We are trying to test a https webservice from soapui (version: SoapUI 4.6.4).
We are facing the below issue.

We have a public ip configured in-front of the webservice and trying to contact the service using the public ip.
eg: https://164.XX.XX.XX/pceConsumerService/

Though we could see that proper cert chain has been exchanged test is failing with the below error.

10:48:55,287 INFO [AbstractHttpRequestDesktopPanel] Error getting response for [PcePortServiceSoapBinding.pceServiceSmiley Very HappynB_TC_BFC0_req]; javax.net.ssl.SSLException: hostname in certificate didn't match: <164.XX.XX.XX> != <dev2imqextweb01.dev.com.au>


Is there any way in SOAPUI to disable the hostname verification.

Please advice.
Thank you
7 REPLIES 7
New Contributor

Re: disable Hostname verification in SOAPUI

Can anyone help on this?

 

Issued new soapUI cacert file under /security folder, based on the downloaded the certificate.

Modified soapUI.sh file to add these two lines:

 

if [ $SOAPUI_HOME != "" ]
then
 ...
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.net.ssl.checkRevocation=false"
    JAVA_OPTS="$JAVA_OPTS -Djsse.enableSNIExtension=false"


Restarted soapUI.

Configured the Proxy Settings of soapUI.

 

But I again when I send a request I get a response that says that the IP (where I send the request) does not match the alias that the cacert file has:

 

Tue Jan 05 16:57:08 EET 2016:ERROR:An error occurred [hostname in certificate didn't match: <xx.xx.xx.xx> != <astringname>], see error log for details

Any idea???

 

Community Hero

Re: disable Hostname verification in SOAPUI

I believe that a certificate is issued against a specific host machine. So you may use hostname in the endpoint instead of ipaddress. Is it feasible for you to try it out?


Regards,
Rao.
New Contributor

Re: disable Hostname verification in SOAPUI

How can I find the hostname? The only thing I did was to try by replacing the ip on my request with the string (which is the alias) of the error message, but still no luck...
How can I disable this check? When I open the soapui system properties I do not see them printed (I am talking about the ones I have set on the .sh file).

Thanks!
Community Hero

Re: disable Hostname verification in SOAPUI

The certificate will have the host name, Isn't it in your case? You also mentioned like 'dev2imqextweb01.dev.com.au'


Regards,
Rao.
New Contributor

Re: disable Hostname verification in SOAPUI

Hi Rao,

 

What is the hostname in my certificate and how can I find it?

If I try to hit this 'astringname' that I get back on the error, instead of my IP I get other strange error response ...

 

tried ping, nslookup and many other options to get hostname out of my IP and get no result (maybe there is no DNS behind).

 


So, how can I workaround this check?

 

Community Hero

Re: disable Hostname verification in SOAPUI

Isn't it shown in the error message you posted?
I understand that the certificate is issue for certain machine. Have you tried opening the certificate?


Regards,
Rao.
New Contributor

Re: disable Hostname verification in SOAPUI

Hi,

I am not the one that has initially posted the question...
So, in my case, the ip is not resolved to the certificate"s hostname because this server is not registered in DNS... that is why I really need to disable this hostname verification
New Here?
Join us and watch the welcome video:
Watch the new Interview