diff options
author | Martin Willi <martin@strongswan.org> | 2008-03-31 07:16:12 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-03-31 07:16:12 +0000 |
commit | d69b267d58581684b8e3013581c7d77db794d9f1 (patch) | |
tree | d8530e2b9de280e2442c95fef36148b3ef8d69e1 /src/charon/credentials/credential_manager.c | |
parent | 1c65129148c00c0246c6fa2b7e59e01ca7c8957b (diff) | |
download | strongswan-d69b267d58581684b8e3013581c7d77db794d9f1.tar.bz2 strongswan-d69b267d58581684b8e3013581c7d77db794d9f1.tar.xz |
fixed refcounting in certificate trustchain validation
Diffstat (limited to 'src/charon/credentials/credential_manager.c')
-rw-r--r-- | src/charon/credentials/credential_manager.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/charon/credentials/credential_manager.c b/src/charon/credentials/credential_manager.c index ac97f73a4..d8381afd4 100644 --- a/src/charon/credentials/credential_manager.c +++ b/src/charon/credentials/credential_manager.c @@ -918,8 +918,8 @@ static bool verify_trust_chain(private_credential_manager_t *this, else { DBG1(DBG_CFG, "no issuer certificate found for \"%D\"", - issuer->get_subject(issuer)); - current->destroy(current); + current->get_subject(current)); + issuer->destroy(issuer); break; } } @@ -1006,7 +1006,8 @@ static bool trusted_enumerate(trusted_enumerator_t *this, } return TRUE; } - return FALSE; + this->current->destroy(this->current); + this->current = NULL; } } /* try to verify the trust chain for each certificate found */ @@ -1024,6 +1025,7 @@ static bool trusted_enumerate(trusted_enumerator_t *this, } return TRUE; } + this->current = NULL; } return FALSE; } |