Details
-
Type:
Bug
-
Status: Open
-
Priority:
P3
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: security-libs
-
Labels:
-
Subcomponent:
Description
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 incorporateJDK-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 closingJDK-8019776 as a dup of this.
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
./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
Attachments
Issue Links
- duplicates
-
JDK-8019776 Make the JSSE Test Templates into a library
-
- Resolved
-