*/
SecretKey getSecretKeyFromInternalResolvers() throws KeyResolverException {
for (int i = 0; i < this.lengthInternalKeyResolver(); i++) {
KeyResolverSpi keyResolver = this.itemInternalKeyResolver(i);
if (log.isDebugEnabled())
log.debug("Try " + keyResolver.getClass().getName());
Node currentChild=this._constructionElement.getFirstChild();
while (currentChild!=null) {
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)) {
SecretKey sk =
keyResolver
.engineResolveSecretKey((Element) currentChild, this
.getBaseURI(), storage);
if (sk != null) {
return sk;
}
}
} else {
for (int k = 0; k < this._storageResolvers.size(); k++) {
StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k);
if (keyResolver.engineCanResolve((Element) currentChild,
this.getBaseURI(),
storage)) {
SecretKey sk = keyResolver
.engineResolveSecretKey((Element) currentChild, this
.getBaseURI(), storage);
if (sk != null) {
return sk;