how REST assured to handle the JVM java Djavax.net.ssl.

34 views
Skip to first unread message

kevin Dai

unread,
Nov 11, 2021, 12:28:49 AM11/11/21
to REST assured
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"));
}

kevin Dai

unread,
Nov 16, 2021, 7:08:58 PM11/16/21
to REST assured

any feedback or I need to find answer from other support group?

kevin Dai

unread,
Nov 19, 2021, 1:29:34 PM11/19/21
to rest-a...@googlegroups.com
REST assured is simplicity, but no support

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rest-assured/34f46a3b-2399-42e3-8b39-823a78656617n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages