安装SSL证书

编程入门 行业动态 更新时间:2024-10-25 14:23:07
安装SSL证书 - 错误DerInputStream.getLength():lengthTag = 94,太大了(Installing SSL certificate - Error DerInputStream.getLength(): lengthTag=94, too big)

尝试为在Tomcat上运行的Web应用程序安装SSL证书。

当我运行此命令时,我收到以下错误:

D:\ jdk1.6.0_30 \ bin> keytool -import -alias root -keystore tomcat2.keystore -trust cacerts -file D:/SSL/gdroot-g2.crt输入密钥库密码:

keytool错误:java.security.cert.CertificateException:无法初始化,ja va.io.IOException:DerInputStream.getLength():lengthTag = 94,太大了。

Trying to install an SSL certificate for a web application that runs on Tomcat.

when I run this command I get the error below:

D:\jdk1.6.0_30\bin>keytool -import -alias root -keystore tomcat2.keystore -trust cacerts -file D:/SSL/gdroot-g2.crt Enter keystore password:

keytool error: java.security.cert.CertificateException: Unable to initialize, ja va.io.IOException: DerInputStream.getLength(): lengthTag=94, too big.

最满意答案

默认情况下,证书具有DER格式

您可以使用参数-rfc导入pem / crt文件

keytool -import -alias root -keystore tomcat2.keystore -trustcacerts -rfc -file D:/SSL/gdroot-g2.crt

the certificate is expected by default having DER format

you can import the pem/crt file with parameter -rfc

keytool -import -alias root -keystore tomcat2.keystore -trustcacerts -rfc -file D:/SSL/gdroot-g2.crt

更多推荐

本文发布于:2023-07-25 10:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1260045.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:证书   SSL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!