簡體   English   中英

Java JNLP錯誤:javax.net.ssl.SSLHandshakeException

[英]java JNLP error: javax.net.ssl.SSLHandshakeException

我正在嘗試運行基於Java JNLP的應用程序。 在家工作正常:javac + javaws是v.1.8的同一版本。

現在,我試圖在工作中運行我的應用程序。 我在代理后面工作,我使用Controlpanel告訴Java繞過托管JNLP的本地服務器的代理。 在服務器端,應用程序使用

javac 1.7.0_60

在客戶端,我嘗試使用以下命令運行它:

$ javaws -version
Java(TM) Web Start 11.40.2.26-fcs 

$ java -version
java version "1.8.0_40"

盡管如此,我在javaws中遇到以下異常

javax.net.ssl.SSLHandshakeException: com.sun.deploy.security.RevocationChecker$StatusUnknownException
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1478)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:969)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:904)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
    at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
    at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1432)
    at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1430)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessController.doPrivileged(AccessController.java:713)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1429)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.deploy.security.RevocationChecker$StatusUnknownException
    at com.sun.deploy.security.RevocationChecker.checkCRLs(Unknown Source)
    at com.sun.deploy.security.RevocationChecker.check(Unknown Source)
    at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source)
    at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source)
    at com.sun.deploy.security.RevocationCheckHelper.checkRevocationStatus(Unknown Source)
    at com.sun.deploy.security.X509TrustManagerDelegate.checkTrusted(Unknown Source)
    at com.sun.deploy.security.X509Extended7DeployTrustManagerDelegate.checkServerTrusted(Unknown Source)
    at com.sun.deploy.security.X509Extended7DeployTrustManager.checkServerTrusted(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460)
    ... 33 more

我讀了https://community.oracle.com/thread/3651870?start=15&tstart=0,但是我不太了解該怎么做。

例如,我已經注釋掉<> / lib / security / java.security

#jdk.tls.disabledAlgorithms=SSLv3

但這仍然行不通。 當我在stacktrace中看到一個“ getInputStream ”時,我想知道javaws是否嘗試下載代理外部的內容?

任何想法 ?

編輯 :如果在controlPanel中,我檢查了JNLP

  • 執行簽名的代碼:不檢查(不建議)
  • 執行TLS證書吊銷:不檢查(不建議)

這個問題與我的代理服務器有關嗎?

Java證書吊銷檢查使用以下一種或兩種方法:

證書吊銷列表(CRL)

此方法需要由證書頒發機構(CA)定期生成和發布列表,以使其保持最新狀態。

在線證書狀態協議(OCSP)

此方法使用CA執行實時證書狀態檢查,使其更可靠,更快速。

如果您的服務器證書是自簽名的,或者您的公司具有內部CA,則您的JRE可能無法正確完成吊銷檢查-因此為“未知”狀態。 如果要運行吊銷檢查(通常這樣做),則需要由支持這兩種方法中的一種或兩種的CA簽名的證書。

同樣重要的是要記住,這里可能有兩個證書在起作用:

  • 用於簽署JAR的證書;
  • 用於連接到服務器的證書

為了使握手成功,兩個證書都必須簽名並且有效(即未撤銷)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM