From: Andreas Steffen Date: Wed, 12 Dec 2007 20:25:50 +0000 (-0000) Subject: fixed error in the ordering of the certinfo_t records in the ocsp cache that caused... X-Git-Tag: 4.1.10~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35b2b1e334e7979bb81f6486a53eb2977bda6a4a;p=thirdparty%2Fstrongswan.git fixed error in the ordering of the certinfo_t records in the ocsp cache that caused multiple entries of the same serial number to be created. This was caused by the iterator_t method insert_after() that inserts a record in the first instead of the last position of a linked list if the end of the list is reached. Fix: use linked_list_t method insert_last() instead. --- diff --git a/src/libstrongswan/crypto/ca.c b/src/libstrongswan/crypto/ca.c index 1577c155d3..510e3528ed 100644 --- a/src/libstrongswan/crypto/ca.c +++ b/src/libstrongswan/crypto/ca.c @@ -654,7 +654,7 @@ static cert_status_t verify_by_ocsp(private_ca_info_t* this, if (comparison > 0) { - iterator->insert_after(iterator, (void *)cached_certinfo); + this->certinfos->insert_last(this->certinfos, (void *)cached_certinfo); } else {