Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-541

Indent secure XML elements the same way as the input XML

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Java 2.1.5
    • None
    • Java
    • None

    Description

      Currently, secured XML elements are not indented, even when the input XML is.
      Take for example EncryptionCreationTest.testEncryptionIdToSecureSupersedesName, which has input with line breaks and indentation:

      <?xml version='1.0'?>
      <Root>
        <Branch1 attr1='abc'/>
        <Branch2 attr1='def'/>
      </Root>
      

      and encrypted output with secured elements that don't have line breaks and indentation:

      <?xml version='1.0' encoding='UTF-8'?><Root>
        <Branch1 attr1="abc"/>
        <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Id="G79d19501-544f-403d-831a-f99e5558a102" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey Id="EKb7c2cb54-1548-44cd-978a-be83fa46c707"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes192"/><xenc:CipherData><xenc:CipherValue>D5c97seyBtid8tGxwjKEzz+xpKt1oCwk</xenc:CipherValue></xenc:CipherData></xenc:EncryptedKey></dsig:KeyInfo><xenc:CipherData><xenc:CipherValue>jWJS/BLcC03RlyqxKYUXnK7zuqvdO8Mu5T9OPIItvmHjeHLEWf9GZrHZMukDFviZ&#xd;
      </xenc:CipherValue></xenc:CipherData></xenc:EncryptedData>
      </Root>
      

      It would be nice if the encrypted elements would use the same indentation and line breaks as the original input.

      Attachments

        Issue Links

          Activity

            People

              coheigea Colm O hEigeartaigh
              peterdm Peter De Maeyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: