Is resolving 'SSLHandshakeException: Received fatal alert: handshake_failure' using TLS 1.2 Ciphers possible in Rest Assured?

1,864 views
Skip to first unread message

sandeep sethi

unread,
Nov 16, 2016, 1:28:08 AM11/16/16
to REST assured
Hi,
From past few days our previously working Rest Assured tests are throwing following exception:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun
.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun
.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun
.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun
.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun
.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
-------

The dev team is responding that unsafe SSL Ciphers were disabled recently, so new TLS 1.2 ciphers need to updated and they provided cipher text.
Unfortunately I am not able to find any API method which can set ciphers. If anyone can show how to accomplish this it would be highly appreciated.

My simple rest code is as follows:
Response response = given()
                       
.proxy(host(HTTP_PROXY).withScheme("http").withPort(8000))                        
                       
.get(URL)
                   
.then()
                       
.contentType(ContentType.JSON)
                       
.extract()
                       
.response();


 

Johan Haleby

unread,
Nov 16, 2016, 1:34:50 AM11/16/16
to rest-a...@googlegroups.com
Not sure if you can set ciphers but I would try SSLConfig and relaxed https validation.

Regards,
/Johan

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sandeep sethi

unread,
Nov 17, 2016, 7:15:35 PM11/17/16
to REST assured
Hi,
I tried with relaxed validation but still no progress. Iam again getting same error.
Anyways, thanks for the response.

Johan Haleby

unread,
Nov 18, 2016, 1:30:50 AM11/18/16
to rest-a...@googlegroups.com
If you find out how to configure this in Apache Http Client then maybe I can guide you on how to do it in RA.

Approv Sharma

unread,
Nov 20, 2016, 11:50:06 PM11/20/16
to REST assured
Hi,

Did you tried following
         
given().relaxedHTTPSValidation("TLSv1.2")
Reply all
Reply to author
Forward
0 new messages