< prev index next >
src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
Print this page
rev 52897 : 8231415: Better signatures in XML
Reviewed-by: weijun, mschoene, rhalade
@@ -168,13 +168,19 @@
if (tag == null || namespace == null) {
throw new MarshalException("Document implementation must " +
"support DOM Level 2 and be namespace aware");
}
if ("KeyInfo".equals(tag) && XMLSignature.XMLNS.equals(namespace)) {
+ 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);
}
}
private static class UnmarshalContext extends DOMCryptoContext {
UnmarshalContext() {}
< prev index next >