Code to generate certificates and CSRs using openssl