16 fprintf(out,
"%d",stage);
24 RSA *rsa,*pub_rsa,*priv_rsa;
26 unsigned char buf[1024],*
p;
35 len=i2d_RSAPublicKey(rsa,&p);
36 len+=i2d_RSAPrivateKey(rsa,&p);
38 printf(
"The public and private key are now both in a char array\n");
39 printf(
"and are taking up %d bytes\n",len);
44 pub_rsa=d2i_RSAPublicKey(NULL,&p,(
long)len);
46 priv_rsa=d2i_RSAPrivateKey(NULL,&p,(
long)len);
48 if ((pub_rsa == NULL) || (priv_rsa == NULL))