Export P7b file with all the certificate chain into CER file

后端 未结 5 436
清歌不尽
清歌不尽 2021-01-31 08:51

I have p7b file provided by Thwate.When I am trying to export the certificate in the cer file using the below command, the certificate chain is not included.
Please suggest

5条回答
  •  执笔经年
    2021-01-31 08:55

    I had similar problem extracting certificates from a file. This might not be the most best way to do it but it worked for me.

    openssl pkcs7 -inform DER -print_certs -in  | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}'
    

提交回复
热议问题