[EMAIL PROTECTED] wrote:
I think I've found a bug in BN_sub_word. It appears that it is not correctly setting the sign of the resulting BIGNUM. The following program attempts to create a BIGNUM with a value of -70, but it instead ends up with value 70.$ ./BNTest Zero: 0 -70: 70 Mike #include <openssl/bn.h> #include <iostream> int main (int argc, char**argv) { BIGNUM* neg = BN_new(); BN_init (neg); BN_zero (neg); char* pz = BN_bn2dec (neg); std::cout << "Zero: " << pz << std::endl; BN_sub_word (neg, 70); pz = BN_bn2dec (neg); std::cout << "-70: " << pz << std::endl; return 0; }
yep a bug, should be fixed in the next snapshot. Thanks, Nils ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
