使用新的实用程序kyrtool,我一直在尝试创建密钥环并将特定的域证书导入其中。
RapidSSL已颁发证书。这是为“* .domain.tld”颁发的SHA2证书。
首先,我创建了一个新的密钥环文件:
kyrtool create -k C:\path\keyring.kyr -p password
然后我在opnessl中将我的pfx证书转换为pem:
openssl pkcs12 -in certificate.pfx -out certificate.pem
然后我尝试将我的PEM导入新的密钥环:
kyrtool import all -i certificate.pem -k C:\path\keyring.kyr -v
发生错误:
Using keyring path 'C:\path\keyring.kyr'
No private key found in the input file
ReadPEMPrivateKey returned error 0x0495
Invalid arguments
我的PEM证书包含----- BEGIN RSA PRIVATE KEY -----和----- BEGIN CERTIFICATE ----- blocks。
有什么想法吗? 谢谢,JiKra
答案 0 :(得分:2)
好的,问题在于PEM文件中证书链中的顺序错误。在颁发者证书(RapidSSL 256 - G3)之前有一个全球CA(GeoTrust CA)证书。
我们通过将整个证书分成四个单独的PEM文件并按正确顺序导入它们来解决问题。
kyrtool import keys
kyrtool import certs
kyrtool import roots ...global
kyrtool import roots ...intemediate
JiKra
编辑1:
正如我们所知,主要问题可能是RapidSSL 256 G3的中间证书,其中最后没有填充。该证书完全以7bit内容结束:
-----BEGIN CERTIFICATE-----
MIIEJTCCAw2gAwIBAgIDAjp3MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYT
AlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVz
dCBHbG9iYWwgQ0EwHhcNMTQwODI5MjEzOTMyWhcNMjIwNTIwMjEzOTMyWjBH
MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UE
AxMXUmFwaWRTU0wgU0hBMjU2IENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQCvVJvZWF0eLFbG1eh/9H0WA//Qi1rkjqfdVC7UBMBd
mJyNkA+8EGVf2prWRHzAn7XpSowLBkMEu/SW4ib2YQGRZjEiwzQ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