Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1478

Use System.lineSeparator() when generating PEM content to avoid issues on Windows

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.Beta12
    • None
    • Utils
    • None

      A couple of the new tests in KeyStoresTestCase in the PR for WFCORE-3305 have started failing recently on Windows due to newline characters not being written properly in generated PEM files:

      KeyStoresTestCase.testExportCertificatePem 	
      java.lang.AssertionError: array lengths differed, expected.length=1068 actual.length=1050
          at org.wildfly.extension.elytron.KeyStoresTestCase.testExportCertificate(KeyStoresTestCase.java:566)
          at org.wildfly.extension.elytron.KeyStoresTestCase.testExportCertificatePem(KeyStoresTestCase.java:542)
      
      KeyStoresTestCase.testGenerateCertificateSigningRequest
      java.lang.AssertionError: array lengths differed, expected.length=782 actual.length=769
          at org.wildfly.extension.elytron.KeyStoresTestCase.testGenerateCertificateSigningRequest(KeyStoresTestCase.java:327)
      

              fjuma1@redhat.com Farah Juma
              fjuma1@redhat.com Farah Juma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: