Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java support for Server Name Indication (SNI) in server role?

Tags:

java

sni

Java 7 brings client support for SNI. Are there known open-source implementations of the SNI server role? Java provides "transparant support" TLS connections (including the handshake), but I need to decouple the handshake process so I can send a certificate back based on the SNI host_name extension.

After failing to find online documentation, I looked in the OpenJDK source code, but there does not seem to be a point where I can monitor the ClientHello message before Java sends the ServerHello message.

like image 585
Lekensteyn Avatar asked Feb 26 '13 22:02

Lekensteyn


2 Answers

I made a quick hack some time ago: https://bitbucket.org/zmarcos/sniserversocket

If you follow the instructions: https://bitbucket.org/zmarcos/sniserversocket/wiki/Home

It will work even on Java EE servers, like Glassfish.

like image 125
Marcos Zolnowski Avatar answered Sep 21 '22 18:09

Marcos Zolnowski


I don't know of a known open-source implementation for for Java 7, but server SNI support is coming in Java 8. If you back-port this to Java 7, I'd love to know.

like image 27
user314104 Avatar answered Sep 20 '22 18:09

user314104