Forum Discussion

chandutou's avatar
11 years ago

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.pceService:DnB_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

  • gogonutsss's avatar
    gogonutsss
    New Contributor

    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???

     

  • nmrao's avatar
    nmrao
    Champion Level 3
    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?
    • gogonutsss's avatar
      gogonutsss
      New Contributor
      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!
      • nmrao's avatar
        nmrao
        Champion Level 3
        The certificate will have the host name, Isn't it in your case? You also mentioned like 'dev2imqextweb01.dev.com.au'