Qpid Proton
  1. Qpid Proton
  2. PROTON-276

Ssl tests fail against proton-j on Windows (tests can't find certificates)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.5
    • Component/s: proton-j
    • Labels:
      None

      Description

      Running mvn test on Windows I see all the (Python) ssl tests fail. The error message is:

      java.lang.RuntimeException: Unable to read PEM object from file _pyclasspath_/proton_tests\ssl_db/ca-certificate.pem

        Activity

        Hide
        Philip Harvey added a comment -

        looks good

        Show
        Philip Harvey added a comment - looks good
        Hide
        Keith Wall added a comment -

        Hi Phil,

        Patch applied... Tests now proton-j tests now passing on windows too. Would you mind reviewing rev 1460177?

        Show
        Keith Wall added a comment - Hi Phil, Patch applied... Tests now proton-j tests now passing on windows too. Would you mind reviewing rev 1460177?
        Hide
        Keith Wall added a comment - - edited

        I think the problem is with our test wrapper, JythonTest, and the arrangement of resources on the classpath (governed by the test/pom.xml). Together they are having the affect of making the python scripts and test resources (e.g. the test certs etc) available to python tests by two different routes.

        • once by way of the Java classpath (tests/target/classes/ is on the classpath),
        • and once again by way of the Python sys.path established in JythonTest#test()

        It seems when the tests are run on Linux, the ssl.py finds the resources by way of the Python sys.path and this allows SslTest#testpath to determine an absolute path to the certificate. However, when the tests are run on Windows the test finds the resources by way of the Java classpath. This means SslTest_testpath returns a filename beginning with the string "pyclasspath_" which then goes on to fail in BouncyCastle's PEMReader.

        Show
        Keith Wall added a comment - - edited I think the problem is with our test wrapper, JythonTest, and the arrangement of resources on the classpath (governed by the test/pom.xml). Together they are having the affect of making the python scripts and test resources (e.g. the test certs etc) available to python tests by two different routes. once by way of the Java classpath (tests/target/classes/ is on the classpath), and once again by way of the Python sys.path established in JythonTest#test() It seems when the tests are run on Linux, the ssl.py finds the resources by way of the Python sys.path and this allows SslTest# testpath to determine an absolute path to the certificate. However, when the tests are run on Windows the test finds the resources by way of the Java classpath. This means SslTest_testpath returns a filename beginning with the string " pyclasspath _" which then goes on to fail in BouncyCastle's PEMReader.

          People

          • Assignee:
            Philip Harvey
            Reporter:
            Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development