write_rsa
static void write_rsa(unsigned char **out, const RSA *rsa, int ispub);
write_rsa(&p, EVP_PKEY_get0_RSA(pk), ispub);