我从CA导入试用版SSL证书时出错了。下面是我创建密钥库的步骤。如果我说错了,请纠正我。提前谢谢!
1.首先,我创建了一个密钥库,并将其放入服务器中。
keytool -keystore server_keystore.jks -genkey -alias server -keyalg rsa -keysize 2048
2.已创建CSR。
keytool -keystore server_keystore.jks -certreq -alias server -keyalg rsa -file server.csr
- 将CSR发送给CA(Thawte),并回复三个试用证书,即CA根证书、CA中间证书和试用SSL。将其保存到扩展名为. cer的文本文件中。(trial_ca_ssl.cer、trial_ca_root.cer、trial_ca_intermediate.cer)
3.尝试导入server_keystore.jks中的trial_ca_ssl.cer,但收到错误。
keytool -import -keystore server_keystore.jks -file trial_ca_ssl.cer -alias server
错误:
keytool error: java.lang.Exception: Failed to establish chain from reply
2条答案
按热度按时间ddrv8njm1#
You should keep your
trial_ca_ssl.cer
text on top of topserver.cer
. This will make a hierarchy of two certificate like this. Then you should import it.-----BEGIN CERTIFICATE----- MIIDSjCCAjKgAwIBAgIIEvabM2CgLZcwDQYJKoZIhvcNAQEFBQAwMzETMBEGA1UE AxMKV2FsdGVyIENBMTEPMA0GA1UEChMGV2FsdGVyMQswCQYDVQQGEwJTRTAeFw0w MzA5MjkwOTI2MzRaFw0wNDA5MjgwOTM2MzRaMDMxEzARBgNVBAMTCldhbHRlciBD QTExDzANBgNVBAoTBldhbHRlcjELMAkGA1UEBhMCU0UwggEgMA0GCSqGSIb3DQEB AQUAA4IBDQAwggEIAoIBAQC3hXksEud68WwPWWHLJQQkTCuX/K32KHPPn/uPUzab Cpc/FnaTmF9yEHmpFdAUr0v5ZPnxVQpcuwrDZc4YfaTLfyUHicQbkftsPAj/2hE4 UukS2j+nQQcJEnIY0vSZOAOLU3j4bf/RlS6Jl7TPFFfWTxuQF8AruQ+YhaE52JFi SapGGXKQJxhsvKT91rLaWSFWNMTTLSDPaBXYEYFuFhLNclDJWf4whfxHSHHkARB/ 3Z0XlT4sFj0fmqEQ6yQb6/WqMFK+1XAIBXZO2MXe26IigWkXw1GfkIx1+fbUPr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BAUwAwEB/zAPBgNVHQ8BAf8EBQMDBwYAMB0GA1UdDgQW BBTDrXZGYXS9GyIUBOZrglhwNjjcnTAfBgNVHSMEGDAWgBTYRzrQMKPDDhP5yM84 PshcQmLPGDANBgkqhkiG9w0BAQUFAAOCAQEAdmTP1qVUcAKOf+/zvb2lcLKvFwKT 6KqDlO5NofjqCIfNgCjO2mO176cslnFIbEZQqgGIUnJ3AwfHKHj+U3kM3n5T29kF xiLKxIDfjsY6qC03KHeGAgxI92XZyPsO1is6Y6qUnAmiwhIp5HS6E0+xIP1shmtJ ZvqU8bueKUWSjx3JDzq+UNLX5pFkK0P0R90TCUEkBx1FNWqoWwb8zfAuO5zcNTEj 5E9esLjwxJQnIVPiA2l3FfZN9yomK+q7kTZJkX2kMx7G850lPR8CneXZT6bIOfck Dw3PqQiroMNx2+gzC/f/wTXsF92aujyG+IZx1FIcNg/MoHXBWG7T8YrjnQ==
-----END CERTIFICATE-----
For details read the User Guide of EJBCA .
pxq42qpu2#
一种可能性是,您使用Mac中的缺省openssl工具,但您从较新版本的openssl复制了\openssl\apps\ca-cert. srl。