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

Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates

XMLWordPrintable

        The javax/net/ssl/templates were created to provide a simple testing framework for JSSE code that can focus testing on the code being changed instead of focusing on the overall test mechanism/framework itself That is, reduce the amount of expected code change to the barest essentials that change from test/test.

        Over the years, the templates have been updated quite significantly:

        1. They have switched from using a central binary keystore file to storing the key material in the test framework itself.
        2. Test classes are now expected to extend the Framework files rather than copy the entire template. e.g.

            public MyTest extends SSLEngine {...}

        Unfortunately, we now have three completely different styles of tests, which really should be harmonized.

        1. SSLSocket.java: has the largest collection of key material for all kinds of different test cases. EC/RSA/DSA/ED25519/ED448/
         with different keylengths/curves/signatures.

        2. SSLEngineTemplate.java has a smaller collection of key material stored in SSLContextTemplate, and is the superclass of SSLEngineTemplate.

        3. SSLSocketSSLEngineTemplate uses the existing binary keystore which has just a few entries (5). Tests directly copy this file, rather than extend it.

        These really should be harmonized so that tests all have the same functionality/keys, and the only thing different is the code to be tested.

        In addition, this should also incorporate JDK-8019776, which makes the JSSE Test Templates into a library that can be extended. Some of the existing tests do that now:

        ./javax/net/ssl/FixingJavadocs/SSLSessionNulls.java
        ./sun/security/ssl/SSLSocketImpl/ReuseAddr.java
        ./sun/security/ssl/SSLContextImpl/MultipleChooseAlias.java

        ./sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java
        ./sun/security/ssl/SignatureScheme/SigSchemePropOrdering.java

        I'm closing JDK-8019776 as a dup of this.

              mdonovan Matthew Donovan
              wetmore Bradford Wetmore
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: