[[EMAIL PROTECTED] - Thu Jun  6 18:39:34 2002]:

[...]
> It appears the openssl guys goofed in 0.97beta.  The prototype for the
> d2i_RSAPrivateKey function in 0.9.6c, which I use, is like this:
> 
>       d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
>       
> ie., without a const on the second parameter.  The const should have
been
> done like this (I think):
> 
>       const unsigned char * const *pp
>       
> ...which would be entirely backwards-compatible with old versions of
> openssl.

Could you explain why you think this would improve compatibility
(compared with 'const unsigned char **pp', which is how 'pp' should
be declared in 0.9.7-beta1, although the exact definition is
hidden behind macros)?

In fact the second 'const' would be wrong because the pointer that
'pp' points to is updated to reflect how much of the encoded data
has been processed by the d2i_... function.  I.e., it is not
at all constant.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to