title: Rest Assured Certification error for GET request with pfx file in keystore
body: <p>I have written the below code to call REST api with pfx file in keystore using Rest Assured.</p>
  <pre><code>    RestAssuredConfig configRestAssured = new RestAssuredConfig();
      SSLConfig sslConfig = configRestAssured.getSSLConfig();
      sslConfig = sslConfig.keyStore(configData.get(&quot;Cert&quot;), configData.get(&quot;CertPassword&quot;)).keystoreType(&quot;PKCS12&quot;);
      configRestAssured = configRestAssured.sslConfig(sslConfig);
      RequestSpecBuilder requestSpecBuilder = new RequestSpecBuilder();
      requestSpecBuilder.setConfig(configRestAssured);
      requestSpecBuilder.setBaseUri(configData.get(&quot;Base_URI&quot;));
      requestSpecBuilder.setPort(Integer.parseInt(configData.get(&quot;Port&quot;)));
      RequestSpecification requestSpecification = requestSpecBuilder.build();
      RestAssured restAssured = new RestAssured();
      requestSpecification = restAssured.given().spec(requestSpecification);
      Response response =requestSpecification .get(&quot;URL&quot;);
      System.out.println(response);
  </code></pre>
  <p>It is giving the below error:</p>
  <blockquote>
  <p>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</p>
  </blockquote>
  <p>but same file with keystore from SOAP UI I am getting response.</p>
  <p>What is the issue in the above code?</p>