title: Programmatically Create X509 Certificate using OpenSSL
body: <p>I have a C/C++ application and I need to create a X509 pem certificate containing both a public and private key.  The certificate can be self signed, or unsigned, doesn't matter.</p>
  
  <p>I want to do this inside an app, not from command line.</p>
  
  <p>What OpenSSL functions will do this for me?  Any sample code is a bonus!</p>