title: How to sign files trustedly with OpenSSL
body: <p>How can you sign files on the <em>command line</em> while using a trusted identity?</p>
  
  <p>For emails you get a x509 certificate, signed by a CA – can you use the same to sign files?</p>
  
  <p>Or would the CA need to sign your public key, and you'd use the corresponding private key to sign the file?</p>
  
  <p>Right now I just found a way to <a href="https://stackoverflow.com/questions/10782826/digital-signature-for-a-file-using-openssl">sign files with the private key</a>, but not a way to have the public key signed by a CA, nor a way to sign files using the cert.</p>