diff options
author | Martin Willi <martin@strongswan.org> | 2008-03-28 12:00:51 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-03-28 12:00:51 +0000 |
commit | 35b6e2301f59a98f833a8b6c14e514929c53b79a (patch) | |
tree | 11366dc7948415b7cdbe1a88540d1565063427b4 /src | |
parent | dca40a94830f44e212f8a40a20f30a158610805e (diff) | |
download | strongswan-35b6e2301f59a98f833a8b6c14e514929c53b79a.tar.bz2 strongswan-35b6e2301f59a98f833a8b6c14e514929c53b79a.tar.xz |
fixed crash if crl fetching fails
Diffstat (limited to 'src')
-rw-r--r-- | src/charon/credentials/credential_manager.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/charon/credentials/credential_manager.c b/src/charon/credentials/credential_manager.c index 805bdbdf9..ac97f73a4 100644 --- a/src/charon/credentials/credential_manager.c +++ b/src/charon/credentials/credential_manager.c @@ -705,10 +705,13 @@ static cert_validation_t check_crl(private_credential_manager_t *this, while (enumerator->enumerate(enumerator, &uri)) { current = fetch_crl(this, uri); - best = get_better_crl(this, current, best, subject, issuer, &valid); - if (best && valid != VALIDATION_STALE) + if (current) { - break; + best = get_better_crl(this, current, best, subject, issuer, &valid); + if (best && valid != VALIDATION_STALE) + { + break; + } } } enumerator->destroy(enumerator); @@ -723,10 +726,13 @@ static cert_validation_t check_crl(private_credential_manager_t *this, while (enumerator->enumerate(enumerator, &uri)) { current = fetch_crl(this, uri); - best = get_better_crl(this, current, best, subject, issuer, &valid); - if (best && valid != VALIDATION_STALE) + if (current) { - break; + best = get_better_crl(this, current, best, subject, issuer, &valid); + if (best && valid != VALIDATION_STALE) + { + break; + } } } enumerator->destroy(enumerator); |