Adding certificate chain to p12(pfx) certificate

前端 未结 2 1491
慢半拍i
慢半拍i 2020-12-14 09:15

I have aplication in java and cxf which connects to WebServices with client certificate.

I got certificates form WebService owner

  • certificate.p12
2条回答
  •  佛祖请我去吃肉
    2020-12-14 09:24

    Own answer.

    I figured out how to do this with OpenSSL:

    openssl pkcs12 -in certificate.p12 -out clientcert.pem -nodes -clcerts
    openssl x509 -in trusted_ca.cer -inform DER -out trusted_ca.pem
    openssl x509 -in root_ca.cer -inform DER -out root_ca.pem
    cat clientcert.pem trusted_ca.pem root_ca.pem >> clientcertchain.pem
    openssl pkcs12 -export -in clientcertchain.pem -out clientcertchain.pfx
    

提交回复
热议问题