title: How to check driver code signing policy is enabled and actually work?
body: <blockquote>
    <p>Starting with 64-bit versions of Windows Vista and later versions of Windows, driver code signing policy requires that all driver code have a digital signature. In addition, certain configurations of 32-bit versions of Windows Vista and later versions of Windows also require driver code to be digitally-signed in order to access next generation premium content that is controlled by the content protection policy. </p>
  </blockquote>
  
  <p>And in any time you can disable this check with (from <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff553484(v=vs.85).aspx" rel="nofollow">How to Test-Sign a Driver Package</a>):</p>
  
  <pre><code>Bcdedit.exe -set TESTSIGNING OFF
  </code></pre>
  
  <p>And reboot after it. After it you can install any driver you want to user pc. Our software use driver to protect it memory from read/write. But if you can install driver with hand made certificate you can break protection and do that you want. To prevent this behaviour i want to check environment about actual status of code signing policy.</p>
  
  <h2>Questions:</h2>
  
  <ol>
  <li>How to check is code signing policy enabled and work using c++/c#?</li>
  <li>Is there some api to chech already loaded driver certificate?</li>
  </ol>