* @throws KeyResolverException
*/
PublicKey getPublicKeyFromInternalResolvers() throws KeyResolverException {
for (int i = 0; i < this.lengthInternalKeyResolver(); i++) {
KeyResolverSpi keyResolver = this.itemInternalKeyResolver(i);
log.debug("Try " + keyResolver.getClass().getName());
for (int j = 0;
j < this._constructionElement.getChildNodes().getLength();
j++) {
Node currentChild =
this._constructionElement.getChildNodes().item(j);
if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
if (this._storageResolvers.size() == 0) {
// if we do not have storage resolvers, we verify with null
StorageResolver storage = null;
if (keyResolver.engineCanResolve((Element) currentChild,
this.getBaseURI(),
storage)) {
PublicKey pk =
keyResolver
.engineResolvePublicKey((Element) currentChild, this
.getBaseURI(), storage);
if (pk != null) {
return pk;
}
}
} else {
for (int k = 0; k < this._storageResolvers.size(); k++) {
StorageResolver storage =
(StorageResolver) this._storageResolvers.elementAt(k);
if (keyResolver.engineCanResolve((Element) currentChild,
this.getBaseURI(),
storage)) {
PublicKey pk = keyResolver
.engineResolvePublicKey((Element) currentChild, this
.getBaseURI(), storage);
if (pk != null) {
return pk;