gpt4 book ai didi

java.security.NoSuchAlgorithmException : Algorithm x25519 not available

转载 作者:行者123 更新时间:2023-12-01 16:22:15 43 4
gpt4 key购买 nike

这段代码出现“javax.net.ssl.SSLException:连接重置”

ReadableByteChannel rbc = Channels.newChannel(url.getInputStream());

但仅当在使用 Open JDK 14 的 jlink 构建的 Java 14 JRE 下运行时。如果我指向完整的 JDK,代码执行得很好。我怀疑 JRE 中缺少某些内容,但它是什么以及为什么 jlink 没有复制缺少的文件?我基于jdeps的jlink命令如下:

"C:\Program Files\Java\jdk-14\bin\jlink.exe" --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.xml --output %AG14InstallDir%\jre_windows2

我是否缺少 jlink 中的模块?关于如何追踪这个问题有什么想法或建议吗?

按照建议添加调试后,我得到了这个输出。我需要复制什么来修复它?

javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.517 UTC|null:-1|Signature algorithm, ed25519, is not supported by the underlying providers
javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.518 UTC|null:-1|Signature algorithm, ed448, is not supported by the underlying providers
javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.519 UTC|null:-1|No AlgorithmParameters for x25519 (
"throwable" : {
java.security.NoSuchAlgorithmException: Algorithm x25519 not available
at java.base/javax.crypto.KeyAgreement.getInstance(Unknown Source)
at java.base/sun.security.ssl.NamedGroup.<init>(Unknown Source)
at java.base/sun.security.ssl.NamedGroup.<clinit>(Unknown Source)
at java.base/sun.security.ssl.SignatureScheme.<clinit>(Unknown Source)
at java.base/sun.security.ssl.SSLSessionImpl.<clinit>(Unknown Source)
at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)
at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.<init>(Unknown Source)
at java.base/sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsClient.createSocket(Unknown Source)
.............

最佳答案

已解决。需要将jdk.crypto.cryptoki添加到jlink中的--add-modules列表中。

关于java.security.NoSuchAlgorithmException : Algorithm x25519 not available,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62238883/

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