title: Install a trusted P7B certificate on Apache
body: <p>I have received a p7b file from a bank which should be a signed certificate, as a response to a csr file that I have sent.</p>
  
  <p>I have manged to extract a pem certificate with the following command:</p>
  
  <pre><code>openssl pkcs7 -print_certs -in certificate.p7b -out certificate.crt
  </code></pre>
  
  <p>The certificate.crt file that I extracted has the following structure:</p>
  
  <pre><code>subject=/C=MK/ST=// ......
  issuer=/CN=XXX
  -----BEGIN CERTIFICATE-----
  .
  .
  .
  -----END CERTIFICATE-----
  subject=/CN=XXX
  issuer=/CN=XXX
  -----BEGIN CERTIFICATE-----
  .
  .
  .
  -----END CERTIFICATE-----
  </code></pre>
  
  <p>I am not an expert on SSL, but I assume that this is a certificate chain, since it has two certificates.</p>
  
  <p>I have configured apache with the following directives:</p>
  
  <pre><code>SSLEngine on
  SSLCertificateFile path/to/certs/certificate.crt
  SSLCertificateChainFile path/to/certs/certificate.crt
  SSLCertificateKeyFile path/to/certs/private.key
  </code></pre>
  
  <p>Apache serves this properly on https, but the browser does not recognize this as a signed certificate, and gives me that Untrusted connection screen.</p>
  
  <p>Am I doing something wrong, or the certificate is not signed by a trusted authority... Is there a way to check if the certificate is signed properly?</p>