[EMAIL PROTECTED] wrote:

> when I call RSA_public_encrypt, it should return a char * of 256 chars,
> right ? The returned char is not 256 chars long.
>
> I measure with pointer hopping like this
>
> while (*sp++)
> ;
> This way it should hop to the end of the unsigned char * and it returns the
> pointer value. (I know this works, its tested)

Well, this _doesn't_ work, as you just tested. ;)

The reason is that RSA_public_encrypt will not return a null-terminated string,
but an array of chars. If any of these chars is null, your loop will terminate.
This is wrong, since the null doesn't mark the end of the array.

- David

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

Reply via email to