From 35b2b1e334e7979bb81f6486a53eb2977bda6a4a Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 12 Dec 2007 20:25:50 +0000 Subject: [PATCH] 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. --- src/libstrongswan/crypto/ca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstrongswan/crypto/ca.c b/src/libstrongswan/crypto/ca.c index 1577c155d..510e3528e 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 {