title: Validate certificate in C#
body: <p>I can't use the System.Security library due to restrictions on the windows 8 applications. I need to use Windows.Security.Cryptography and I need to validate that a certificate (.cer file) and a key (.key file) are a valid pair.</p>
  
  <p>I'm already reading the file and creating a new instance of a certificate:</p>
  
  <pre><code>Windows.Security.Cryptography.Certificates.Certificate objCert = new Windows.Security.Cryptography.Certificates.Certificate(stream);
  </code></pre>
  
  <p>stream being the .cer file as an IBuffer.</p>
  
  <p>I can extract some of the properties of the .cer file like expiration or issuer,  but I can't get the key that it was signed with, and compare it to the key contained in the .key file.</p>