From: Richard Levitte Date: Sun, 3 Feb 2002 21:31:41 +0000 (+0000) Subject: ASN1_BIT_STRING_set_bit() didn't clear previously set bits X-Git-Tag: OpenSSL-engine-0_9_6c^2^2~42 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b9a3ef4c6e96f74b995474d84add495072ad8951;p=oweals%2Fopenssl.git ASN1_BIT_STRING_set_bit() didn't clear previously set bits --- diff --git a/CHANGES b/CHANGES index 42c32dc20a..0f65cb17c0 100644 --- a/CHANGES +++ b/CHANGES @@ -4,14 +4,19 @@ Changes between 0.9.6 and 0.9.7 [xx XXX 2001] - OpenSSL 0.9.6a/0.9.6b (bugfix releases, 5 Apr 2001 and 9 July 2001) - and OpenSSL 0.9.7 were developed in parallel, based on OpenSSL 0.9.6. + OpenSSL 0.9.6a/0.9.6b/0.9.6c (bugfix releases, 5 Apr 2001, 9 July 2001 + and 21 Dec 2001) and OpenSSL 0.9.7 were developed in parallel, based + on OpenSSL 0.9.6. Change log entries are tagged as follows: -) applies to 0.9.6a/0.9.6b/0.9.6c only *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7 +) applies to 0.9.7 only + *) Have ASN1_BIT_STRING_set_bit() really clear a bit when the requested + value is 0. + [Richard Levitte] + +) Have the CHIL engine fork-safe (as defined by nCipher) and actually make the newer ENGINE framework commands for the CHIL engine work. [Toomas Kiisk and Richard Levitte] diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index 46e97038a2..c36817c1ee 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -172,6 +172,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) w=n/8; v=1<<(7-(n&0x07)); iv= ~v; + if (!value) v=0; a->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear, set on write */