Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Enable TLSv1.1 in java http client  RSS feed

srinivasan arumugam
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do a http post using httpclient-4.1.1.jar,httpcore-4.1.jar. i am using java version "1.7.0_79". The webservice call which i do has to pass through akamai. Akamai implemented a new rule as to reject all requests below TLSv1. So my webservice call fails as 1.7.0_79 does not have TLSv1.1 not enabled, but it still supports. From this link i verified it java 1.7.0_79 supports TLSv1.1 . I tried setting "-Dhttps.protocols=TLSv1.1" while running the stand alone program. Tried setting it as system property in code "System.setProperty("https.protocols", "TLSv1.1");" . I dont know how to set TLSv1.1 before http call so that akamai wont reject my request. Please suggest

Output :

%% Cached client session: [Session-1, TLS_RSA_WITH_AES_128_CBC_SHA]
main, setSoTimeout(0) called
main, WRITE: TLSv1 Application Data, length = 656
main, READ: TLSv1 Application Data, length = 704
main, called close()
main, called closeInternal(true)
main, SEND TLSv1 ALERT: warning, description = close_notify
main, WRITE: TLSv1 Alert, length = 32
main, called closeSocket(selfInitiated)
main, called close()
main, called closeInternal(true)
<TITLE>Access Denied</TITLE>
<H1>Access Denied</H1>

You don't have permission to access


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!