From b9a3ef4c6e96f74b995474d84add495072ad8951 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 3 Feb 2002 21:31:41 +0000 Subject: [PATCH 1/1] ASN1_BIT_STRING_set_bit() didn't clear previously set bits --- CHANGES | 9 +++++++-- crypto/asn1/a_bitstr.c | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) 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 */ -- 2.34.1