单点登陆CAS安装过程中可能遇到的问题

可能遇到的问题:

错误:

java.security.cert.CertificateException: No name matching localhost found

原因:

keystore里没有名字为localhost的信息

解决方法:

使用keytool创建public-private keypair时,你的姓名应该设置成localhost

错误:

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

原因:

jre中没有导入相关证书

解决方法:

向tomcat使用的JRE中导入习惯证书

首先导出证书:

keytool -export -file d:/tomcat6.crt -alias tomcat6

其中tomcat6为你自己创建的key name

其次,导入证书

keytool -import -keystore d:jdk1.6jrelibsecuritycacerts -file D:/tomcat6.crt -alias tomcat6

原文地址:https://www.cnblogs.com/sdjnzqr/p/4065660.html