From: Rich Salz <[EMAIL PROTECTED]>

rsalz> As I see it, you have a couple of choices.
rsalz> 1.  Leave the old code, as shown in the first fragment, but declared the
rsalz> parameters const.  You can't do that, because the resultant code is not
rsalz> standard-conforming.
rsalz> 
rsalz> 2.  Declare the parameters const, but introduce new local
rsalz> variables that cast away the const-ness.

You mean something like this?

                if (i == 1 && !BN_get_flags(b,BN_FLG_STATIC_DATA))
                        {
                        BIGNUM *tmp_bn = (BIGNUM *)b;
                        bn_wexpand(tmp_bn,al);  // modifies b
                        tmp_bn->d[al] = 0;

If that's it, I don't quite understand how that differs from casting
in any other way.  BTW, the code given above is exactly what I
currently have in my work directory as a solution to getting back to
the old behavior but keeping the constness in the parameters.  It does
still include an evil cast, which I thought was the actual problem
here.

rsalz> It's a tough call, and almost completely a matter of taste.

Yup...  :-)

-- 
Richard Levitte   \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken   \ S-168 35  BROMMA  \ T: +46-8-26 52 47
Redakteur@Stacken   \      SWEDEN       \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to