Otto Moerbeek wrote:
....
OK, that would amount to the fixes below:

- in BN_cmp, call bn_fix_top just before comparing the two tops.

Not really necessary as the normal BN_* functions which change the value of the bignum should always ensure that the top value is correct (i.e. as small as possible), but of course adding bn_fix_top does not really harm (besides wasting some cpu time :-) .


- in bn_print.c, change if(x->top == 0) to if (BN_is_zero(x)) (a few cases)

ack



- in bn_word.c, add the (w & BN_MASK2) == 0 check for both adding and subtracting. I'm using the masked value, to be consistent with the code later on, which also masks w.

ack



Diff against the OpenBSD version of two months ago (to get the BN_add_word fix included). Applies without problems to openssl-0.9.7b.

Perhaps you should send a bug report to [EMAIL PROTECTED] containing the patch and a link to this thread.

Nils

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

Reply via email to