Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.io.IOException:使用keytool导入证书时出现非法页脚_Java_Glassfish_Ssl Certificate_Keytool - Fatal编程技术网

java.io.IOException:使用keytool导入证书时出现非法页脚

java.io.IOException:使用keytool导入证书时出现非法页脚,java,glassfish,ssl-certificate,keytool,Java,Glassfish,Ssl Certificate,Keytool,当我尝试使用keytool将证书导入密钥存储时,它会显示: keytool error: java.security.cert.CertificateException: java.io.IOException: Illegal footer: ----END CERTIFICATE----- java.security.cert.CertificateException: java.io.IOException: Illegal footer: ----END CERTIFICATE-----

当我尝试使用
keytool
将证书导入密钥存储时,它会显示:

keytool error: java.security.cert.CertificateException: java.io.IOException: Illegal footer: ----END CERTIFICATE-----
java.security.cert.CertificateException: java.io.IOException: Illegal footer: ----END CERTIFICATE-----
        at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:337)
        at java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:462)
        at sun.security.tools.KeyTool.installReply(KeyTool.java:2571)
        at sun.security.tools.KeyTool.doCommands(KeyTool.java:998)
        at sun.security.tools.KeyTool.run(KeyTool.java:340)
        at sun.security.tools.KeyTool.main(KeyTool.java:333)
Caused by: java.io.IOException: Illegal footer: ----END CERTIFICATE-----
        at sun.security.provider.X509Factory.checkHeaderFooter(X509Factory.java:590)
        at sun.security.provider.X509Factory.readOneBlock(X509Factory.java:575)
        at sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:413)
        at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:335)
        ... 5 more
我已成功地将CA证书添加到我的密钥存储中,没有任何问题。有人能帮忙吗?有语法错误吗?我将Glassfish 3.1.2.2与java 7一起使用。

使用------结束证书------而不是------结束证书-----

Java7需要领先的5位,Java6可能没有。见来源