当前位置: 首页 > 知识库问答 >
问题:

与java版本兼容

端木望
2023-03-14

我正在使用JDK1.6 keyool生成cacerts。

然后我使用JRE1使用这个cacerts文件。7,但我会遇到这样的例外:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        at sun.security.ssl.Handshaker.process_record(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
        at com.sun.identity.setup.OpenSSOConfigurator.main(OpenSSOConfigurator.java:172)
Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed
        at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
        at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
        ... 12 more
Caused by: java.security.cert.CertPathValidatorException: signature check failed
        at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown Source)
        at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown Source)
        at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source)
        at java.security.cert.CertPathValidator.validate(Unknown Source)
        ... 18 more
Caused by: java.security.SignatureException: Signature does not match.
        at sun.security.x509.X509CertImpl.verify(Unknown Source)
        at sun.security.provider.certpath.BasicChecker.verifySignature(Unknown Source)
        at sun.security.provider.certpath.BasicChecker.check(Unknown Source)
        ... 22 more
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)2015-01-07 19:22:02 IST - ERROR: Problems - bootstrap file not created

这是兼容性问题吗?使用一个版本的java生成的Cacert是否与另一个版本的java不兼容?

共有1个答案

孙修德
2023-03-14

在另一个答案中已经解释过了

您的问题的答案是,您使用SUN作为密钥库提供商,java 6是在oracle购买SUN之前发布的,java 7是在oracle购买SUN之后发布的,许多SUN软件包现在都不推荐使用。

有关详细信息,请阅读官方文档:Java加密体系结构Oracle Providers documentation For Java Platform Standard Edition 7

 类似资料:
  • 它的版本问题是肯定的,因为我在另一个项目中以同样的方式使用它,但在play 2.6中(不确定是否与它有任何关系) 如果我降级elasticmq版本,我会得到以下错误: 异常或错误导致运行中止:java.lang.noClassDeffounderror:akka/http/scaladsl/settingsettingsettingsjava.lang.bootstrapmethoderror:j

  • 问题内容: 我需要很快将应用程序升级到Java 11,我想知道与Java 11兼容的最低Spring版本是多少。 我目前正在使用Java 8和Spring 4.2.7。 问题答案: 从他们的任务跟踪器中 -SPR-16391:与JDK 11的兼容性 。计划与 5.1 GA 版本一起实现JDK 10、11的兼容性。 JDK 11当前计划于2018年9月发布。从我们的角度来看,除了JDK 10之外,

  • 我目前使用的是Java8和Spring4.2.7。

  • 与Java11兼容的jetty最低版本是什么? 我目前在Jetty6.1.3上运行Java7。我尝试简单地升级jre和相关的依赖,但它不工作。

  • 我必须在一个需要运行Java6的旧项目中工作,因为在未来的版本中,已经删除了对贬值的sun类的引用。作为过程的一部分,我将系统路径中的jdk从8更改为指向Java6JDK。这样做后,我得到: 这类似于 Maven 安装 OSX 错误 不支持的主要.次要版本 51.0 和线程“主要” java.lang.不受支持的类版本中的异常错误: a (不支持的主要.minor 版本 51.0) 但是我不打算升

  • 我有一个使用JDK1.7编译的jar文件,我想在加载时检查一下我的jar运行的java运行时环境是否是1.7或更新的。有办法做到这一点吗? 我尝试使用System.getProperty(“java.version”),但这没有帮助,因为我的类版本是51,而JRE1.6拒绝加载它。