I had a quick look at the code and it seems like it should always crash if a
public key is passed in. It looks like it tries to dereference rsa->p
without first checking that it is not NULL. So it seems strange to me that
it works in some cases. Sorry that I don't know any more about this.
Steven
> -----Original Message-----
> From: Andrey Kubyshev [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 12:16 PM
> To: Reddie, Steven
> Subject: Re[2]: RSA_check_key (pub_rsa) crashes
>
> Hello Steven,
>
> Thank you for quick answer!
>
> Steven> RSA_check_key checks the consistency of private RSA key's only.
> Since this
> Steven> function fails to check that the key contains the necessary
> values, it
> Steven> dereferences a NULL pointer (rsa->p) and promptly crashes. Try
> passing in
> Steven> the private key instead of the public key.
> But when i save key to file in pem format , read from
> it and do RSA_check_key on public key it return 0.
> So i expected the same in this situation. 0 if not private key
> or -1 if error occured (as described in documentation).
> But not access violation ...
> Whats your opinion ? Should it be fixed or there is some sense
> in it ?
>
> --
> Best regards,
> Kubyshev Andrey mailto:[EMAIL PROTECTED]
>
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]