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]
Re: cvs commit: openssl/crypto/bn bn.h bn_exp.cbn_exp2.cbn_gcd.cbn_lib.c bn_mont.c bn_mul.c bn_prime.c bn_recp.cbn_shift.cbn_sqr.cbntest.c
Richard Levitte - VMS Whacker Wed, 08 Nov 2000 07:14:52 -0800
- Re: cvs commit: openssl/crypto/bn bn.h bn_ex... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Dr S N Henson
- Re: cvs commit: openssl/crypto/bn b... Ben Laurie
- Re: cvs commit: openssl/crypto/bn bn.h ... Ben Laurie
- Re: cvs commit: openssl/crypto/bn bn.h ... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Ulf Moeller
- Re: cvs commit: openssl/crypto/bn b... Paul D. Smith
- Re: cvs commit: openssl/crypto/bn bn.h ... Rich Salz
- Re: cvs commit: openssl/crypto/bn bn.h ... Rich Salz
- Re: cvs commit: openssl/crypto/bn b... Ben Laurie
- Re: cvs commit: openssl/crypto/bn b... Paul D. Smith
- Re: cvs commit: openssl/crypto/bn bn.h ... Rich Salz
- Re: cvs commit: openssl/crypto/bn bn.h ... Ben Laurie
- Re: cvs commit: openssl/crypto/bn bn.h ... Ben Laurie
- Re: cvs commit: openssl/crypto/bn bn.h ... Ben Laurie
