在用keytool生成服务器端SSL证书后,启动springboot时,报错java.io.IOException: DerInputStream.getLength(): lengthTag=111, too big.使用了以下命令行:
keytool -genkey -alias tomcat -keypass 123456 -keyalg RSA -keysize 1024 -validity 3650 -keystore D:\keystore\keystore.p12 -storepass 123456
出错原因是:没有指明storetype 为 pkcs12
补救方法:
keytool -importkeystore -srckeystore D:\keystore\keystore.p12 -destkeystore D:\keystore\new\keystore.p12 -deststoretype pkcs12
将刚才生成的证书指定为pkcs12密钥库
本文详细介绍了在使用keytool生成服务器端SSL证书后,遇到的SpringBoot启动时的IOException错误及其解决方法。错误源自未指定storetype为pkcs12,通过重新导入证书到指定类型的密钥库中解决了问题。
897

被折叠的 条评论
为什么被折叠?



