Java 7中的Java SNIServerName支持 [英] Java SNIServerName support in Java 7

查看:319
本文介绍了Java 7中的Java SNIServerName支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 Wikipedia ,Java 1.7应该支持SNIServerName,但按照 Java文档的javax.net.ssl包中没有此类.弄清楚这个吗?我是否必须使用Java 8 API才能使用SNIServerName类?

As per Wikipedia, Java 1.7 should support SNIServerName, but as per Java docs there is no such class in their javax.net.ssl package.Can someone please clarify this? Will I have to use Java 8 API to use SNIServerName class?

推荐答案

支持在那里,请参见

JSSE客户端的服务器名称指示(SNI):Java SE 7版本 在JSSE中支持服务器名称指示(SNI)扩展 客户. RFC 4366中描述了SNI.这使TLS客户端能够 连接到虚拟服务器.

Server Name Indication (SNI) for JSSE client: The Java SE 7 release supports the Server Name Indication (SNI) extension in the JSSE client. SNI is described in RFC 4366. This enables TLS clients to connect to virtual servers.

但是,它是以不同的方式实现的.例如 https://issues.apache.org/jira/browse/HTTPCLIENT-1119 对此进行了讨论.相关报价可能是

However, it is implemented in a different way. For example https://issues.apache.org/jira/browse/HTTPCLIENT-1119 discusses this. The relevant quote might be

Java 8提供了完全不同的SNI API, javax.net.ssl包

Java 8 has a completely different SNI API provided out of javax.net.ssl package

是的,您不会在Java 7中使用该类,并且会像您问的那样必须使用Java 8 API来使用SNIServerName类".

So yes, you won't have that class with Java 7, and you will "have to use Java 8 API to use SNIServerName class", like you asked.

有关如何在Java 7中使用SNI的讨论,请参见此线程.

For discussion on how to use SNI with Java 7, see this thread.

这篇关于Java 7中的Java SNIServerName支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆