title: Validate Authenticode signature on EXE - C++ without CAPICOM
body: <p>I'm writing a function for an installer DLL to verify the Authenticode signature of EXE files already installed on the system.</p>
  
  <p>The function needs to:</p>
  
  <blockquote>
    <p>A) verify that the signature is valid.<br>
    B) verify that the signer is our organization.</p>
  </blockquote>
  
  <p>Because this is in an installer, and because this needs to run on older Win2k installations, I <strong>don't</strong> want to rely on CAPICOM.dll, as it may not be on the target system.</p>
  
  <p>The <a href="http://msdn.microsoft.com/en-us/library/aa388208(VS.85).aspx" rel="noreferrer">WinVerifyTrust</a> API works great to solve (A).</p>
  
  <p>I need to find a way to compare a known certificate (or properties therein) to the one that signed the EXE in question.</p>