On Wed, 2002-05-22 at 09:16, [EMAIL PROTECTED] wrote:
> 
> I have a problem doing a simple program. I want to convert to and from a
> rsa structure to a DER. When I do it, I get a  segmentation fault and I
> don't know why. Please can anybody help me?
> 
> The code is:

hi luis,

next time, please, paste your code instead of sending an image... anyway

RSA_generate_key creates a new RSA key so you don't have to call RSA_new
previously.

the line

clave_der -= long_mensaje;

what does exactly do? you don't need it.

d2i_RSAPublicKey also creates a new RSA key so you don't have to call
RSA_new().

with this changes you won't get the Segmentation fault. But you'll get
that RSA_check_key does not return 1 as you expect. I guess, that's
because you are trying to check a non complete RSA key, because you just
have the public component.


regards,


aleix



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to