Dear all,
I've an access violation exception error when I run the following code:
...
RSA *key = RSA_generate_key(1024,3,NULL,NULL);
FILE *fos;
remove("mykey.puk");
if ((fos = fopen("mykey.puk","w+b")) == NULL)
{
return -1;
}
i2d_RSAPublicKey_fp(fos,key); // access violation at this line
...
Can you tell me why?
The final goal of my program is to generate a public/private key pair and to
store them separately in two files (like "mykey.puk" and "mykey.prk"). The
private key must be stored with PKCS#8 specifications and the public key
with X.509 specification.
How can I do that?
Thanks for your answer.
Best regards.
Nicolas Heuvelmans.
Nicolas Heuvelmans <mailto:[EMAIL PROTECTED]>
E.F.T. Consultants s.a.
av. Plasky 157 / 6 - 1030 Brussels - Belgium
Tel +32 (0)2 736.89.11 - Fax +32 (0)2 736.88.53
URL http://www.eft.be
Note: This message and its attachements have been checked for viruses by InterScan
VirusWall V3.4