handle case where subject = NULL but keyid is set

This commit is contained in:
Andreas Steffen 2012-02-20 12:12:31 +01:00
parent 81ce0cf67e
commit e4f554404e
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,8 @@ cert_t* get_authcert(identification_t *subject, chunk_t keyid,
}
/* compare the subjectDistinguishedNames */
if (!certificate->has_subject(certificate, subject))
if (!(subject && certificate->has_subject(certificate, subject)) &&
(subject || !keyid.ptr))
{
continue;
}