Skip to content
Permalink
Browse files
8231415: Better signatures in XML
Reviewed-by: weijun, mschoene, rhalade
  • Loading branch information
seanjmullan committed Oct 15, 2019
1 parent 25642dd commit 9efd3d7f20fa0e9889f3877ed8602aa0cb9435fc
Showing 2 changed files with 16 additions and 4 deletions.
@@ -170,9 +170,15 @@ public KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure)
"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 @@ private XMLSignature unmarshal(Node node, XMLCryptoContext context)
"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);
}
}

0 comments on commit 9efd3d7

Please sign in to comment.