8231415: Better signatures in XML
Reviewed-by: weijun, mschoene, rhalade
This commit is contained in:
parent
25642dd303
commit
9efd3d7f20
@ -170,9 +170,15 @@ public final class DOMKeyInfoFactory extends KeyInfoFactory {
|
||||
"support DOM Level 2 and be namespace aware");
|
||||
}
|
||||
if ("KeyInfo".equals(tag) && XMLSignature.XMLNS.equals(namespace)) {
|
||||
return new DOMKeyInfo(element, new UnmarshalContext(), getProvider());
|
||||
try {
|
||||
return new DOMKeyInfo(element, new UnmarshalContext(), getProvider());
|
||||
} catch (MarshalException me) {
|
||||
throw me;
|
||||
} catch (Exception e) {
|
||||
throw new MarshalException(e);
|
||||
}
|
||||
} else {
|
||||
throw new MarshalException("invalid KeyInfo tag: " + namespace + ":" + tag);
|
||||
throw new MarshalException("Invalid KeyInfo tag: " + namespace + ":" + tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,9 +192,15 @@ public final class DOMXMLSignatureFactory extends XMLSignatureFactory {
|
||||
"support DOM Level 2 and be namespace aware");
|
||||
}
|
||||
if ("Signature".equals(tag) && XMLSignature.XMLNS.equals(namespace)) {
|
||||
return new DOMXMLSignature(element, context, getProvider());
|
||||
try {
|
||||
return new DOMXMLSignature(element, context, getProvider());
|
||||
} catch (MarshalException me) {
|
||||
throw me;
|
||||
} catch (Exception e) {
|
||||
throw new MarshalException(e);
|
||||
}
|
||||
} else {
|
||||
throw new MarshalException("invalid Signature tag: " + namespace + ":" + tag);
|
||||
throw new MarshalException("Invalid Signature tag: " + namespace + ":" + tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user