简体   繁体   English

Maven运行代码时缺少SSL SNI

[英]SSL SNI missing when maven runs the code

I try to get an SSL secured site which requires SNI with asynchttpclient 2.0.24. 我尝试获得一个SSL安全的站点,该站点要求使用asynchttpclient 2.0.24的SNI。 Everything is fine in Eclipse. 在Eclipse中一切都很好。 However when I run the code with maven I get handshake errors. 但是,当我使用Maven运行代码时,出现握手错误。

Allowing debug level ssl logging, it turned out that the server name is not registered during the maven build, the "Extension server_name, server_name: ..." line is missing from the log and it is present during Eclipse run. 允许进行调试级别的ssl日志记录,结果证明在maven构建期间未注册服务器名称,日志中缺少“扩展服务器名称,服务器名称:...”行,并且在Eclipse运行期间存在。 This is the only difference between the logs. 这是日志之间的唯一区别。 The weird thing is that in both cases the SslEngines's context contains the correct sniNames parameter. 奇怪的是,在两种情况下,SslEngines的上下文都包含正确的sniNames参数。

Same JDK is used with Eclipse and Maven. Eclipse和Maven使用相同的JDK。

Any ideas what could cause this issue? 有什么想法可能导致此问题?

一些使用默认JDK连接的代码具有副作用,这会导致这种奇怪的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM