简体   繁体   English

在 Windows 上安装 Ejbca 时,“c:\ejbca\p12\truststore.jks”中缺少 JKS truststorestore 文件

[英]Missing JKS truststorestore file in 'c:\ejbca\p12\truststore.jks' while installing Ejbca on Windows

I am installing EJBCA on a Windows.我正在 Windows 上安装 EJBCA。
OS version: Windows Server 2016操作系统版本:Windows Server 2016
Java: OpenJDK 8.0.242.08 Ant: ant 1.9.14 Java:OpenJDK 8.0.242.08 Ant:ant 1.9.14
Database: MariaDB 10.4.12数据库:MariaDB 10.4.12
Server: Wildfly 10.1.0服务器:Wildfly 10.1.0
EJBCA Version: 6.15.2 EJBCA 版本:6.15.2

Installation proceeded using this https://doc.primekey.com/ejbca6152/ejbca-installations/ejbca-main-installation manual.使用此https://doc.primekey.com/ejbca6152/ejbca-installations/ejbca-main-installation手册继续安装。

Unfortunately on the command ant deploy-keystore provides this error:不幸的是,在命令ant deploy-keystore上提供了这个错误:

jee:deploytruststore:吉:部署信任库:

BUILD FAILED
c:\ejbca\build.xml:844: The following error occurred while executing this line:
c:\ejbca\bin\jboss.xml:310: The following error occurred while executing this line:
c:\ejbca\bin\jboss.xml:294: Missing JKS truststorestore file in 'c:\ejbca/p12/truststore.jks'

It has a corresponding error (I think they are related):它有一个相应的错误(我认为它们是相关的):

ejbca:javatruststore:
    [input] skipping input as property ca.name has already been set.
     [echo] Getting root certificate in DER format...
     [echo] ca getcacert "ManagementCA" C:\Users\tsaForFN\AppData\Local\Temp\2\/rootca.der -der
     [java] Wrote CA certificate to 'C:\Users\tsaForFN\AppData\Local\Temp\2\/rootca.der' using DER encoding.
     [echo] Adding to or creating keystore: c:\ejbca/p12/truststore.jks

ejbca:javatruststore-removeold:
     [exec] keytool error: java.lang.Exception: Input not an X.509 certificate
     [exec] java.lang.Exception: Input not an X.509 certificate
     [exec]     at sun.security.tools.keytool.Main.addTrustedCert(Main.java:2861)
     [exec]     at sun.security.tools.keytool.Main.doCommands(Main.java:1050)
     [exec]     at sun.security.tools.keytool.Main.run(Main.java:366)
     [exec]     at sun.security.tools.keytool.Main.main(Main.java:359)

     [exec] Result: 1
   [delete] Deleting: C:\Users\tsaForFN\AppData\Local\Temp\2\rootca.der

I tried to change slashes but it still didn't worked.我试图改变斜杠,但它仍然没有用。

This is the log of Wildfly server https://controlc.com/bb5d54f4这是 Wildfly 服务器https://controlc.com/bb5d54f4的日志
This is the log of EJBCA installation https://controlc.com/f6f062d2这是EJBCA安装的日志https://controlc.com/f6f062d2

properties are default except database which is configured, working and not relevant right now.属性是默认的,但数据库已配置、正在工作但现在不相关。

Your issue is this: "Input not an X.509 certificate"您的问题是:“输入不是 X.509 证书”

This is due to your usage of "implicitlyCA" in "install.properties", creating a CA certificate that is not useable by normal clients.这是由于您在“install.properties”中使用了“implicitlyCA”,创建了普通客户端无法使用的 CA 证书。

Initializing CA with 'ManagementCA' 'CN=ManagementCA,O=EJBCA Sample,C=SE' 'soft' '<ca.tokenpassword hidden>' 'implicitlyCA' 'ECDSA' '3650' 'null' 'SHA256withECDSA' -superadmincn 'SuperAdmin'...使用 'ManagementCA' 'CN=ManagementCA,O=EJBCA Sample,C=SE' 'soft' '<ca.tokenpassword hidden>' 'implicitlyCA' 'ECDSA' '3650' 'null' 'SHA256withECDSA' -superadmincn 'SuperAdmin 初始化 CA '...

You have configured the Management CA to use "implicitlyCA" ECDSA, which is not something that Java, Windows or any web servers and browsers support.您已将管理 CA 配置为使用“implicitlyCA”ECDSA,这不是 Java、Windows 或任何 Web 服务器和浏览器支持的内容。

You need to use keys (in the ca.keyspec setting) that can be used for TLS connections, such as RSA 2048 or ECDSA prime256v1.您需要使用可用于 TLS 连接的密钥(在 ca.keyspec 设置中),例如 RSA 2048 或 ECDSA prime256v1。

ImplicitlyCA can only be used if you are really really really sure what you are doing, and you use specific customer client software.只有当您真的非常确定自己在做什么并且您使用特定的客户客户端软件时,才能使用 ImplicitlyCA。

The step before is ant runinstall which:之前的步骤是 ant runinstall 其中:

1- created the Management CA. 1- 创建管理 CA。

2-Create TLS keystores for handling HTTPS, signed by the Management CA 2-创建用于处理 HTTPS 的 TLS 密钥库,由管理 CA 签名

3-Create the key store for the initial super administrator 3-为初始超级管理员创建密钥库

it might not successfully done 2nd and 3rd step.它可能无法成功完成第二步和第三步。

So you need to:所以你需要:

delete all the date(rows) in you ejbca database in all tables,then from $EJBCA_HOME:删除所有表中 ejbca 数据库中的所有日期(行),然后从 $EJBCA_HOME:

ant -q clean deployear ant -q clean deployear

ant runinstall ant 运行安装

ant deploy-keystore ant 部署密钥库

Inshaallah it will work Inshaallah 它会工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM