Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Validating which cacerts file Parasoft is using

Ramiro Martinez
Ramiro Martinez Posts: 53 admin

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.

The error:

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

def getJavaPath():
Application.showMessage(System.getProperty("java.home"))

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.

Tagged: