当我尝试以 HTTPS 模式托管 vert.x 应用程序时出现错误。
我正在使用 JDK 版本java-11-openjdk-headless-11.0.10.0.9。
当我尝试满足任何请求时,我收到以下错误:
javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)
当 JDK 版本为java-11-openjdk-headless-11.0.9.11时,应用程序运行良好
我正在使用 vert.x 4.0.3。
下面是我如何使用 HTTPServerOption:
SelfSignedCertificate selfSignedCertificate = SelfSignedCertificate.create();
HttpServerOptions httpServerOptions = new HttpServerOptions()
.setSsl(true)
.setEnabledSecureTransportProtocols(ENABLE_TLS_TCP)
.setKeyCertOptions(selfSignedCertificate.keyCertOptions())
.setTrustOptions(selfSignedCertificate.trustOptions());
任何输入都会非常有帮助。