OpenSSL creating and signing certificates in C/C++