title: How to retrieve certificates from a pfx file with c#?
body: <p>I've been googling around for half a day looking for a way to read a <code>.pfx</code> file and import the certificates into the <em>certstore</em>. </p>
  
  <p>So far, I am able to read the <code>.pfx</code> file with <code>X509Certifcate</code> and able to import one certificate within the <code>.pfx</code> file. So far so good, but there are three certificates in the <code>.pfx</code> file and when loading the <code>.pfx</code> with <code>X509Certificate</code>, I am not able to see the other two certificates.</p>
  
  <p>The certificate was exported with </p>
  
  <p>*Personal Information Exchange - PKCS #12 (.PFX)</p>
  
  <ul>
  <li><p>Include all certificates in the certification path if possible</p></li>
  <li><p>Enable strong protection (requires IE 5.0, NT 4.0 SP4 or above)</p></li>
  </ul>
  
  <p>Those are the options selected when exporting the certificate(s). I know there are three certificates because I manually go into the <em>certstore (MMC)</em> and import it into a personal folder myself.</p>