gpt4 book ai didi

Java 7 中的 Java SNIServerName 支持

转载 作者:太空宇宙 更新时间:2023-11-03 13:23:22 30 4
gpt4 key购买 nike

根据 Wikipedia , Java 1.7 应支持 SNIServerName,但根据 Java docs他们的 javax.net.ssl 包中没有这样的类。有人可以澄清一下吗?我必须使用 Java 8 API 才能使用 SNIServerName 类吗?

最佳答案

支持就在那里,参见https://docs.oracle.com/javase/7/docs/technotes/guides/security/enhancements-7.html :

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讨论这个。相关报价可能是

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

所以是的,Java 7 不会有那个类,您将“必须使用 Java 8 API 才能使用 SNIServerName 类”,就像您问的那样。

有关如何在 Java 7 中使用 SNI 的讨论,请参阅 this thread .

关于Java 7 中的 Java SNIServerName 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41829133/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com