Add HX509_QUERY_MATCH_FUNCTION that allows caller to match by

function, note that this doesn't not work directly for backends that
implements ->query, they must do their own processing.
(I'm running out of flags, only 12 left now)


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15810 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-27 21:45:25 +00:00
parent 09977986dc
commit 430ca62d97
2 changed files with 8 additions and 1 deletions

View File

@@ -1345,6 +1345,11 @@ _hx509_query_match_cert(const hx509_query *q, hx509_cert cert)
if (strcasecmp(q->friendlyname, name) != 0)
return 0;
}
if (q->match & HX509_QUERY_MATCH_FUNCTION) {
int ret = (*q->cmp_func)(cert);
if (ret != 0)
return 0;
}
if (q->match & ~HX509_QUERY_MASK)
return 0;