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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user