Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
After updating from 8u221 to 8u231, serializing the DOM to a byte array using transforms causes all lines in signed XML document to end with the ASCII character for carriage return. This is the code that no longer works: ByteArrayOutputStream writer = new ByteArrayOutputStream(); Transformer trans = TransformerFactory.newInstance().newTransformer(); trans.transform(new DOMSource(ownerDoc), new StreamResult(writer)); xmlSigned = writer.toByteArray();
|