Validating which cacerts file Parasoft is using
In the Security preferences section of SOAtest or Virtualize, there is an option to "Use default Java cacerts file" as the trust store for server certificates. However, depending on which install of Java SOAtest/Virtualize is using, the cacerts file may vary. This article explains how to find the location of the cacerts file.
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
indicates that the server's certificate is not trusted by SOAtest. If you are using the option Use default Java cacerts file in Parasoft > Preferences > Security this means that the server's certificate has not been added to the cacerts file that SOAtest is using. Depending on your environment, if there are multiple instances of Java installed on the machine, the location of the cacerts file SOAtest is using can change.
The logical question then is: "How do I find out which cacerts file SOAtest is using?" Here's do to do it:
Create a new empty TST (SOAtest) or PVN (Virtualize) file in any project (SOAtest: File > New > Test (.tst) file, Virtualize: File > New > Provisioning Action (.pvn) file)
Add a new Extension Tool to the empty TST or PVN you created in step (1)
Change the Language dropdown to Jython
Add the following code in the text box of the Extension Tool and save:
from com.parasoft.api import Application
from java.lang import System
When you are finished, the extension tool should look like this:
Now, just run the extension tool. In the "Console" view, you will see the location of the JRE Parasoft is using. On my machine, this is C:\Program Files\Java\jre7. I will call this location . The cacerts file Parasoft is using is located in /lib/security/cacerts. So on my machine, the cacerts file Parasoft is using is located at C:\Program Files\Java\jre7\lib\security\cacerts.