Create a PKCS#7 (.p7b) from certificate (.crt)

Solution ID:    SO7948    Updated:    05/03/2017

Solution

In order to create a PKCS#7 file perform the following steps below:
 

Method 1: Using Windows
  1. Open the .crt file by double clicking on it.  If the file is another format such as .pem/.cer it can be renamed to .crt as they are the same format.
  2. Verify that the certificate chain is correct, by choosing the Certification Path tab.
    Note: There should be 2 or 3 certificates for a complete chain.
  3. Go to the Details tab and select Copy to File.
  4. The Certificate Export Wizard opens > click Next.
  5. Select Cryptographic Message Syntax Standard - PKCS #7 Certificates (.P7B), and select Include all certificates in the path if possible> click Next.
  6. Click Browse, choose a location where you want to save the certificate file and specify a file name of the certificate you want to export. Click Save > click Next.
  7. Click Finish.
  8. To verify your .p7b file, double click on the file.
  9. Find the Certificates folder in the tree and verify that it contains 2 or 3 certificates (Root CA, Intermediate CA and SSL certificate).
Method 2: Using OpenSSL
  1. Place the intermediate and certificate files on a server with OpenSSL.
  2. Run the following command to combine the certificate and intermediate:
     
    openssl crl2pkcs7 -nocrl -certfile certificate.cer -certfile intermediate.cer -out certificate.p7b

     

Legacy ID

vs44799

Find Answers

Languages

This article is available in the following languages: