Rafa Marín López wrote:

> Hello.

Hi.

>
>  RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length);
>
> What does length param mean?

length is the length of the *pp data, that means it is the number of bytes that you 
want to convert from DER to internal form, starting at location *pp. Still in other 
words, it is the data contained inbetween *pp and *pp+(length-1) that will be 
converted from DER to internal form. On successful completion, *pp will be updated to 
point to *pp + length.
You must pass this info to the function because it has no other reliable means to 
determine how long the DER-encoded data is. (It could use the length info of the first 
tag it sees, but it doesn't).

BTW, a good source for answers to this kind of questions is 
http://www.columbia.edu/~ariel/ssleay. Although the stuff there is sometimes a bit 
outdated, it can still help a lot.

Cheers,
Steve

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

Reply via email to