How to enable SNI in HTTP request using Apache HTTPComponents HttpClient?

前端 未结 1 1983
故里飘歌
故里飘歌 2020-12-06 11:09

I am trying to figure out how to send a successful HTTP GET request to a server requiring SNI.

I searched on SO and other places, and found some articles that said

相关标签:
1条回答
  • 2020-12-06 11:56

    SNI should work completely transparently when running on Java 1.7 or newer. No configuration is required. If for whatever reason SSL handshake with SNI enabled server fails you should be able to find out why (and whether or not the SNI extension was properly employed) by turning on SSL debug logging as described here [1] and here [2]

    'Debugging SSL/TLS Connections' may look outdated but it can still be useful when troubleshooting SSL related issues.

    [1] http://docs.oracle.com/javase/1.5.0/docs/guide/security/jsse/ReadDebug.html

    [2] http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug

    0 讨论(0)
提交回复
热议问题