How to generate RSA and EC keys with OpenSSL