RSAKeyValueResolverpublic class RSAKeyValueResolver extends KeyResolverSpi
Fields Summary |
---|
static Logger | log{@link java.util.logging} logging facility | private Element | _rsaKeyElementField _rsaKeyElement |
Methods Summary |
---|
public boolean | engineCanResolve(org.w3c.dom.Element element, java.lang.String BaseURI, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver storage)
if (true)
if (log.isLoggable(java.util.logging.Level.FINE)) log.log(java.util.logging.Level.FINE, "Can I resolve " + element.getTagName());
if (element == null) {
return false;
}
boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
Constants._TAG_KEYVALUE);
boolean isRSAKeyValue = XMLUtils.elementIsInSignatureSpace(element,
Constants._TAG_RSAKEYVALUE);
if (isKeyValue) {
this._rsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(),
Constants._TAG_RSAKEYVALUE, 0);
if (this._rsaKeyElement != null) {
return true;
}
} else if (isRSAKeyValue) {
// this trick is needed to allow the RetrievalMethodResolver to eat a
// ds:RSAKeyValue directly (without KeyValue)
this._rsaKeyElement = element;
return true;
}
return false;
| public java.security.PublicKey | engineResolvePublicKey(org.w3c.dom.Element element, java.lang.String BaseURI, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver storage)
if (this._rsaKeyElement == null) {
boolean weCanResolve = this.engineCanResolve(element, BaseURI,
storage);
if (!weCanResolve || (this._rsaKeyElement == null)) {
return null;
}
}
try {
RSAKeyValue rsaKeyValue = new RSAKeyValue(this._rsaKeyElement,
BaseURI);
return rsaKeyValue.getPublicKey();
} catch (XMLSecurityException ex) {
if (log.isLoggable(java.util.logging.Level.FINE)) log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
}
return null;
| public javax.crypto.SecretKey | engineResolveSecretKey(org.w3c.dom.Element element, java.lang.String BaseURI, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver storage)
return null;
| public java.security.cert.X509Certificate | engineResolveX509Certificate(org.w3c.dom.Element element, java.lang.String BaseURI, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver storage)
return null;
|
|