title: Unable to sign module (vboxdrv)
body: <p>Since I have secure boot on Ubuntu 16.04 enabled, I need to sign vboxdrv.</p>
  
  <p>I create signing keys using:</p>
  
  <pre><code>openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/"
  </code></pre>
  
  <p>Then I sign the module:</p>
  
  <pre><code>sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
  </code></pre>
  
  <p>However, when I call:</p>
  
  <p>modinfo vboxdrv</p>
  
  <p>The module is not confirmed to be signed:</p>
  
  <p><code>
  $ modinfo vboxdrv
  filename:       /lib/modules/4.4.0-22-generic/updates/dkms/vboxdrv.ko
  version:        5.0.18_Ubuntu (0x00240000)
  license:        GPL
  description:    Oracle VM VirtualBox Support Driver
  author:         Oracle Corporation
  srcversion:     316C2AE8082B5DFBAABE7EA
  depends:<br>
  vermagic:       4.4.0-22-generic SMP mod_unload modversions 
  parm:           force_async_tsc:force the asynchronous TSC mode (int)
  </code></p>
  
  <p>I then run:</p>
  
  <pre><code>sudo mokutil --import MOK.der
  </code></pre>
  
  <p>And reboot, which prompts me to import a machine owner key. </p>
  
  <p>However, this fails (invalid parameter (2)). </p>
  
  <p>I think its due to the module not being signed earlier, as running modinfo vboxdrv should confirm that the module was signed.</p>