title: How to code sign Mac OS X kernel extension with self signed certificate
body: <p>I've tried to sign my kext using the command:  </p>
  
  <pre><code>sudo codesign -s "MyCert" -f MyKext.kext
  </code></pre>
  
  <p>I've created the certificate using the certificate assistance, with type "codesign".
  But if I validate the kext using:</p>
  
  <pre><code>kextutil -tn MyKext.kext
  </code></pre>
  
  <p>The following error is displayed:</p>
  
  <pre><code>Code Signing Failure: code signature is invalid
  </code></pre>
  
  <p>So, how to codesign a kext using an self signed certificate?</p>