SSL IOExceptionjavax.net.ssl.SSLKeyException: RSA premaster secret 错误

2022-01-25 00:00:00 ssl ssl-certificate java

我们有一个专有软件来运行负载测试.当我尝试运行该工具时,我的日志中出现以下异常.我已经没有如何解决它的想法了.我看到了大多数答案,他们在运行应用程序时卸载和安装 java 并在命令行中设置类路径.我尝试了这些解决方法,但仍然没有运气.

We have a proprietary software to run the load testing. When I try to run the tool, I am getting the following exception in my logs. I am running out of ideas how to resolve it. I seen most of the answers and they got it working uninstalling and installing the java and setting the classpath in the command line while running the application . I tried those work around, but still no luck.

Java 版本:JDK 1.6.0_24

Java version: JDK 1.6.0_24

已经尝试过本论坛中提到的答案,

Already tried the answers mentioned in this forum,

点击这里

C:lt>"C:Program FilesJavajdk1.6.0_24"injava -Djava.class.path="C:/lt/lib/base12.jar;C:/lt/lib/cldcapi11.jar;C:/lt/lib/commons-codec-1.3.jar;C:/lt/lib/commons-dbcp-1.1.jar;C:/lt/lib/commons-pool-1.1.jar;C:/lt/lib/com_dexterra_platform_midp_base.jar;C:/lt/lib/incubator-activemq-4.1.jar;C:/lt/lib/jargs.jar;C:/lt/lib/javassist-3.12.0.GA.jar;C:/lt/lib/javax.jms.jar;C:/lt/lib/joda-time-1.6.jar;C:/lt/lib/log4j-extension.jar;C:/lt/lib/log4j.jar;C:/lt/lib/messaging-base12.jar;C:/lt/lib/midpapi20.jar;C:/lt/lib/spring-1.2.6.jar;C:/lt/lib/tstdevice12.jar;C:/lt/lib/wma20.jar;C:/lt/lib/xbean-spring-2.2.jar;C:/lt/lib/lt.jar;C:/lt/lib/test.jar;C:/lt/lib/jsr75.jar""-Dtestclient.cfg.file=libTestClientConfig.xml"  -DNUM_CLIENTS=2 -DCLIENT_START_ID=0 -DSTART_DELAY=0 -DUSERS_FILE=C:/lt/xmlapitool/bin/newsubscribers.csv-Djava.ext.dirs=lib  -classpath "C:Program FilesJavajdk1.6.0_24libext*" -jar TestDevice.jar -t data -a ConfigurableApp -n -b -d psr -p password -u psr -s KickOff

非常感谢任何帮助!

Wed Oct 16 15:59:22 MDT 2013 ERROR [main-tstdevice-0] SSL IOExceptionjavax.net.ssl.SSLKeyException: RSA premaster secret error
Terminate client due to exception: javax.net.ssl.SSLKeyException: RSA premaster secret error
    at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:97)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:744)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:238)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:73)
    at java.io.DataOutputStream.writeShort(DataOutputStream.java:150)
    at com.octanewave.platform.messaging.OW_SSLLoginRequest.writeTo(OW_SSLLoginRequest.java:174)
    at com.octanewave.platform.SystemManagerBase.login(SystemManagerBase.java:865)
    at com.octanewave.platform.OW_DeviceSecurityManager.login(OW_DeviceSecurityManager.java:786)
    at com.octanewave.platform.ApplicationStartupBase.run(ApplicationStartupBase.java:268)
    at com.octanewave.test.midp.TestClient.run(TestClient.java:779)
    at com.octanewave.test.midp.TestClient.runClient(TestClient.java:441)
    at com.octanewave.test.midp.TestClient.main(TestClient.java:266)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javassist.Loader.run(Loader.java:290)
    at com.octanewave.test.midp.TestClient$1.run(TestClient.java:341)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
    at javax.crypto.KeyGenerator.<init>(DashoA13*..)
    at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
    at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
    at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:89)
    ... 26 more 

如果您需要更多详细信息,请告诉我.

Let me know, if you need any more details.

谢谢,拉梅什

推荐答案

检查这个 javahttps 网络问题

https://forums.oracle.com/thread/1533888

这可能是您的 java 安装和缺少 jar 文件的问题.https://java.net/jira/browse/GLASSFISH-15653

This could be a problem with your java installation and missing jar files.. https://java.net/jira/browse/GLASSFISH-15653

相关文章