EVP_PKEY *EVP_PKEY_new(void);
RSA * RSA_new(void);
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
int EVP_PKEY_assign_RSA(EVP_PKEY *pkey, RSA *key);
int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb,...