i2d_RSAPrivateKey problem II

2000-04-04 Thread Jiri Holinek
My last mail was break into a lot of parts. Here is the program fragment who's generate an error. rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL); if (rsa == NULL) { ERR_print_errors_fp(stderr); exit(1); } if (RSA_check_key(rsa) = 0) { ERR_print_errors_fp(stderr);

Re: i2d_RSAPrivateKey problem II

2000-04-04 Thread Geoff Thorpe
At 02:24 PM 4/4/00 +0200, "Jiri Holinek" [EMAIL PROTECTED] wrote: [snip] pvk_len = i2d_RSAPrivateKey(rsa, pvk_buf); /* There are some data in pvk_buf, but are corrupted. */ free(pvk_buf); /* This causes segmentation fault */ [snip] I fixed this by: pvk_len = i2d_RSAPrivateKey(rsa, NULL);

i2d_RSAPrivateKey problem

2000-04-03 Thread ing. Jiri Holinek
The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your

i2d_RSAPrivateKey problem

2000-04-03 Thread ing. Jiri Holinek
Sorry for my English. I have a simple program for generating RSA key with writting it in DER format. But key converted with i2d_RSAPrivateKey function to DER format is invalid. openssl rsa -infrom der -in privkey.der reports: read RSA key unable to load key 8317:error:0D09D082:asn1 encoding

Re: i2d_RSAPrivateKey problem

2000-04-03 Thread Richard Levitte - VMS Whacker
holinek openssl rsa -infrom der -in privkey.der reports: "form", not "from"... -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 Redakteur@Stacken \ SWEDEN \ or +46-708-26 53 44

Re: i2d_RSAPrivateKey problem

2000-04-03 Thread Dr Stephen Henson
ing. Jiri Holinek wrote: Sorry for my English. I have a simple program for generating RSA key with writting it in DER format. But key converted with i2d_RSAPrivateKey function to DER format is invalid. openssl rsa -infrom der -in privkey.der reports: read RSA key unable to load key