]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
credential-manager: Check cache queue when destroying trusted certificate enumerator
authorTobias Brunner <tobias@strongswan.org>
Tue, 27 Oct 2015 16:17:54 +0000 (17:17 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 10 Mar 2016 10:07:14 +0000 (11:07 +0100)
We already do this in the trusted public key enumerator (which
internally uses the trusted certificate enumerator) but should do so
also when this enumerator is used directly (since the public key
enumerator has the read lock the additional call will just be skipped
there).

src/libstrongswan/credentials/credential_manager.c

index 736111b935afaf1c44bfb5fe652a0c93f5cb92bd..95c5cd777672e72339a177ee028a443d318d8831 100644 (file)
@@ -918,6 +918,8 @@ METHOD(enumerator_t, trusted_destroy, void,
        DESTROY_IF(this->auth);
        DESTROY_IF(this->candidates);
        this->failed->destroy_offset(this->failed, offsetof(certificate_t, destroy));
+       /* check for delayed certificate cache queue */
+       cache_queue(this->this);
        free(this);
 }
 
@@ -986,7 +988,6 @@ METHOD(enumerator_t, public_destroy, void,
                this->wrapper->destroy(this->wrapper);
        }
        this->this->lock->unlock(this->this->lock);
-
        /* check for delayed certificate cache queue */
        cache_queue(this->this);
        free(this);