So, the question is how to correctly make a binary data of RSA *rsa key? I do
RSA *rsa = RSA_generate_key(2048, 65537, 0, 0);
uchar *pp = (uchar *)malloc(2560);
int bytes = i2d_RSAPublicKey(rsa, &pp);
write(client, pp, bytes);
和对应的2i_RSAPublicKey和节目坠毁。 什么是错了?