Dear sir.
I use the REST assured to test rest service. I have to handle certificate in client call.
before I use (JKS type keystore.jks and trustore.jks)
config
Djavax.net.ssl.keyStorePassword=password
Djavax.net.ssl.keyStoreType=jks
Djavax.net.ssl.keyStore=keystore.jks
Djavax.net.ssl.trustStore=truststore.jks
Djavax.net.ssl.trustStorePassword=password
Djavax.net.ssl.trustStoreType=jks
I do not know how to handle it in REST assured.
I am blocking for this issue.
I try to use
I can not put bot keystore and trustStore in sslConfig. Only can pass keystore or trustStore file.
Any suggestion ? thanks a lot
restAssured.config = RestAssured.config().sslConfig(new SSLConfig()
.trustStore("truststore.jks", "password")
.keyStore("keystore.jks","Fach64GNcJH")
.keystoreType("jks")
.trustStoreType("jks")
);
private void validateHealthCheckSuccess(){
Response response =
given().spec(requestSpec)
.config()
.when().get()
.then()
.log().ifError()
.statusCode(HttpStatus.
SC_OK)
.extract()
.response();
JsonPath jsonPathEvaluator = response.jsonPath();
assertThat(jsonPathEvaluator.get("status"),
equalToIgnoringCase("UP"));
}