Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235603

8u231 Transform of DOM to byte array adds ASCII carriage return to signed XML

    XMLWordPrintable

    Details

      Description

      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();

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kravikumar Kiran Sidhartha Ravikumar
              Reporter:
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: