title: How to install / access .cer file in Windows mobile 5.0 Pocket PC device?
body: <p><strong>I want to access the information (like issuer name, expiry date, etc) from .cer file .</strong></p>
  
  <p>I tried checking if the certificate is present in the store (it will not be present anyways since I didn't install the certificate)</p>
  
  <pre><code>X509Store store = new X509Store("test", StoreLocation.LocalMachine);
  store.Open(OpenFlags.ReadOnly);    
  X509Certificate2Collection certificates = store.Certificates.Find(X509FindType.FindBySubjectName, certSearchString, false);
  </code></pre>
  
  <p>If it is not found, tried to read from the cer file following the below steps</p>
  
  <ol>
  <li>Read the contents of certificate file using BinaryReader which results in byte[] value</li>
  <li><code>X509Certificate2 cert = new X509Certificate2(byte value returned by the above step)</code> - In this step I'm getting an exception as follows:</li>
  </ol>
  
  <blockquote>
    <p>"System.Security.Cryptography.CryptographicException: Creating
    certificate object failed. The data passed in is either incorrect or
    is not supported by .NET Compact Framework. .NET Compact Framework
    does not support reading from pfx files."</p>
  </blockquote>
  
  <p><strong>Is there any way to install or access the information from cer file ?</strong></p>
  
  <p><strong>It would be more useful if it could be done programmatically through invoking some exe or utility.</strong></p>
  
  <p><strong>My aim is to validate all the web requests using the certificate. All that I have is only the cer file.</strong> </p>
  
  <p><strong>Is there any way to validate the web requests directly by using the cer file alone ?</strong></p>