protected Iterable<Credential> resolveFromSource(CriteriaSet criteriaSet) throws SecurityException {
checkCriteriaRequirements(criteriaSet);
String entityID = criteriaSet.get(EntityIDCriteria.class).getEntityID();
UsageCriteria usageCriteria = criteriaSet.get(UsageCriteria.class);
UsageType usage;
if (usageCriteria != null) {
usage = usageCriteria.getUsage();
} else {
usage = UsageType.UNSPECIFIED;
}
if (!matchUsage(keystoreUsage, usage)) {
log.debug("Specified usage criteria {} does not match keystore usage {}", usage, keystoreUsage);