summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/revocation/revocation_validator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/revocation/revocation_validator.c')
-rw-r--r--src/libstrongswan/plugins/revocation/revocation_validator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/revocation/revocation_validator.c b/src/libstrongswan/plugins/revocation/revocation_validator.c
index 16ee0ecc7..1b68320df 100644
--- a/src/libstrongswan/plugins/revocation/revocation_validator.c
+++ b/src/libstrongswan/plugins/revocation/revocation_validator.c
@@ -444,7 +444,7 @@ static certificate_t *get_better_crl(certificate_t *cand, certificate_t *best,
enumerator_t *enumerator;
time_t revocation;
crl_reason_t reason;
- chunk_t serial;
+ chunk_t subject_serial, serial;
crl_t *crl = (crl_t*)cand;
if (base)
@@ -473,10 +473,11 @@ static certificate_t *get_better_crl(certificate_t *cand, certificate_t *best,
return best;
}
+ subject_serial = chunk_skip_zero(subject->get_serial(subject));
enumerator = crl->create_enumerator(crl);
while (enumerator->enumerate(enumerator, &serial, &revocation, &reason))
{
- if (chunk_equals(serial, subject->get_serial(subject)))
+ if (chunk_equals(subject_serial, chunk_skip_zero(serial)))
{
if (reason != CRL_REASON_CERTIFICATE_HOLD)
{