生成的密钥库,并在application.properties文件中配置,如此链接中所示 - http://doc-kurento.readthedocs.io/en/stable/mastering/securing-kurento-applications.html
但仍面临错误 -
java.io.IOException:Keystore被篡改,或密码是 不正确 at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) 〜[NA:1.7.0_101] at sun.security.provider.JavaKeyStore $ JKS.engineLoad(JavaKeyStore.java:55) 〜[NA:1.7.0_101] 在java.security.KeyStore.load(KeyStore.java:1226)〜[na:1.7.0_101] 在org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:451) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:355) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:608) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:548) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:360) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:765) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) 〜[Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.catalina.connector.Connector.startInternal(Connector.java:986) [Tomcat的嵌入芯-8.0.28.jar:8.0.28] 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [Tomcat的嵌入芯-8.0.28.jar:8.0.28] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) [Tomcat的嵌入芯-8.0.28.jar:8.0.28] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:194) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:151) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) [弹簧上下文4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [弹簧引导1.3.0.RELEASE.jar:1.3.0.RELEASE] 在org.kurento.tutorial.one2onecall.One2OneCallApp.main(One2OneCallApp.java:60) [类/:NA] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)〜[na:1.7.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 〜[NA:1.7.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 〜[NA:1.7.0_101] 在java.lang.reflect.Method.invoke(Method.java:606)〜[na:1.7.0_101] 在org.codehaus.mojo.exec.ExecJavaMojo $ 1.run(ExecJavaMojo.java:293) [EXEC-行家-插件-1.4.0.jar:NA] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_101]引起:java.security.UnrecoverableKeyException:密码验证 失败 at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) 〜[NA:1.7.0_101] ...省略了28个常见帧
答案 0 :(得分:1)
文档中包含文件格式的错误 。正确的文件看起来像这样
server.port: 8443
server.ssl.key-store: keystore.jks
server.ssl.key-store-password: yourPassword
server.ssl.keyStoreType: JKS
server.ssl.keyAlias: yourKeyAlias
检查您的文件是否符合,并确保您在server.ssl.key-store
答案 1 :(得分:0)
我最近也遇到了同样的问题-造成原因:
java.security.UnrecoverableKeyException:密码验证失败。密钥库被篡改,或者密码不正确
问题已解决的步骤。
第1步:通过使用cmd在安装的jdk下检查密钥库证书密码是否正确
keytool -list -keystore cacerts from [$JAVA_HOME/jre/lib/security] or from the folder where the cert is pointed
如果步骤1有效
步骤2:从应用程序中检查-应用程序如何传递密码。它可能是带有其他逗号的密码或拼写错误。您从应用程序提供的密码与原始密钥库密码不匹配,因此Java安全性抛出UnrecoverableKeyException