log.debug("I can't");
}
return null;
}
/** Field _x509childObject[] */
XMLX509SKI x509childObject[] = null;
Element x509childNodes[] = null;
x509childNodes = XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509SKI);
if (!((x509childNodes != null) && (x509childNodes.length > 0))) {
if (log.isDebugEnabled()) {
log.debug("I can't");
}
return null;
}
try {
if (storage == null) {
Object exArgs[] = { Constants._TAG_X509SKI };
KeyResolverException ex =
new KeyResolverException("KeyResolver.needStorageResolver", exArgs);
if (log.isDebugEnabled()) {
log.debug("", ex);
}
throw ex;
}
x509childObject = new XMLX509SKI[x509childNodes.length];
for (int i = 0; i < x509childNodes.length; i++) {
x509childObject[i] = new XMLX509SKI(x509childNodes[i], baseURI);
}
Iterator<Certificate> storageIterator = storage.getIterator();
while (storageIterator.hasNext()) {
X509Certificate cert = (X509Certificate)storageIterator.next();
XMLX509SKI certSKI = new XMLX509SKI(element.getOwnerDocument(), cert);
for (int i = 0; i < x509childObject.length; i++) {
if (certSKI.equals(x509childObject[i])) {
if (log.isDebugEnabled()) {
log.debug("Return PublicKey from " + cert.getSubjectDN().getName());
}
return cert;