[英]Javax.net.ssl.SSLHandShakeException: No Appropriate protocol (IKVM dll)
Hello I am running into an issue regarding connecting to a Java server.您好,我遇到了关于连接到 Java 服务器的问题。 We would like to move away from Java and move to a C# implementation, but unfortunately we heavily rely on a 3rd party java library.
我们希望摆脱 Java 并转向 C# 实现,但不幸的是,我们严重依赖 3rd 方 Java 库。
In an effort to move towards a C# application I converted the jar file into a dll which I used to reference in my C# application using IKVM.为了转向 C# 应用程序,我将 jar 文件转换为一个 dll,我曾经使用 IKVM 在我的 C# 应用程序中引用它。 Everything seems to work and objects are initialized properly, however when I attempt to call a java method that would setup the connection I receive the exception stated above.
一切似乎都可以正常工作并且对象已正确初始化,但是当我尝试调用将设置连接的 java 方法时,我收到了上述异常。
Calling java's javax.net.ssl getSupportedCipherSuites from my C# application shows that the cipher needed to connect is not supported.从我的 C# 应用程序调用 java 的 javax.net.ssl getSupportedCipherSuites 显示不支持连接所需的密码。 However, when running the same code, but this time written in java the appropriate suites are shown.
但是,当运行相同的代码时,但这次是用 java 编写的,会显示相应的套件。 I believe this is why the handshake is failing, but am unsure how to get the C# application to support the specified cipher.
我相信这就是握手失败的原因,但我不确定如何让 C# 应用程序支持指定的密码。
I am using .NET Framework 4.8.我正在使用 .NET Framework 4.8。 I have tried setting
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
我试过设置
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
but it does not seem like it did anything.但它似乎没有做任何事情。
Does anyone have any idea what could cause the discrepancy between the java and C# supported cipher suites?有谁知道什么可能导致 java 和 C# 支持的密码套件之间存在差异?
Hello I am running into an issue regarding connecting to a Java server.您好,我遇到了关于连接到 Java 服务器的问题。 We would like to move away from Java and move to a C# implementation, but unfortunately we heavily rely on a 3rd party java library.
我们希望摆脱 Java 并转向 C# 实现,但不幸的是,我们严重依赖 3rd 方 Java 库。
In an effort to move towards a C# application I converted the jar file into a dll which I used to reference in my C# application using IKVM.为了转向 C# 应用程序,我将 jar 文件转换为一个 dll,我曾经使用 IKVM 在我的 C# 应用程序中引用它。 Everything seems to work and objects are initialized properly, however when I attempt to call a java method that would setup the connection I receive the exception stated above.
一切似乎都可以正常工作并且对象已正确初始化,但是当我尝试调用将设置连接的 java 方法时,我收到了上述异常。
Calling java's javax.net.ssl getSupportedCipherSuites from my C# application shows that the cipher needed to connect is not supported.从我的 C# 应用程序调用 java 的 javax.net.ssl getSupportedCipherSuites 显示不支持连接所需的密码。 However, when running the same code, but this time written in java the appropriate suites are shown.
但是,当运行相同的代码时,但这次是用 java 编写的,会显示相应的套件。 I believe this is why the handshake is failing, but am unsure how to get the C# application to support the specified cipher.
我相信这就是握手失败的原因,但我不确定如何让 C# 应用程序支持指定的密码。
I am using .NET Framework 4.8.我正在使用 .NET Framework 4.8。 I have tried setting
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
我试过设置
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
but it does not seem like it did anything.但它似乎没有做任何事情。
Does anyone have any idea what could cause the discrepancy between the java and C# supported cipher suites?有谁知道什么可能导致 java 和 C# 支持的密码套件之间存在差异?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.