1 # Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
   2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3 #
   4 # This code is free software; you can redistribute it and/or modify it
   5 # under the terms of the GNU General Public License version 2 only, as
   6 # published by the Free Software Foundation.
   7 #
   8 # This code is distributed in the hope that it will be useful, but WITHOUT
   9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11 # version 2 for more details (a copy is included in the LICENSE file that
  12 # accompanied this code).
  13 #
  14 # You should have received a copy of the GNU General Public License version
  15 # 2 along with this work; if not, write to the Free Software Foundation,
  16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17 #
  18 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19 # or visit www.oracle.com if you need additional information or have any
  20 # questions.
  21 
  22 ##### Summary #####
  23 This test is used to check the interop compatibility on JSSE among different
  24 JDK releases. The oldest version supported by the test is JDK 7. Some of Java
  25 source files, JdkUtils.java, Server.java, and Client.java, use only JDK 7-compliant
  26 language features and APIs, in order to allowing different JDK releases can load
  27 and run associated classes.
  28 
  29 ##### Output #####
  30 The test can generate a report at $JTREG_WORKDIR/scratch/report.html to display
  31 the key information for each case. It also outputs all of details on both of
  32 server and client sides to a separated file at $JTREG_WORKDIR/scratch/test.html.
  33 
  34 ##### Report Columns #####
  35 No.
  36     A sequence number. It contains a hyper link to the corresponding details
  37     in $JTREG_WORKDIR/scratch/test.html.
  38 
  39 ServerJDK
  40     The version of the JDK that acts as server.
  41 
  42 ClientJDK
  43     The version of the JDK that acts as client.
  44 
  45 Protocol
  46     The TLS protocol version.
  47 
  48 CipherSuite
  49     The only enabled cipher suite on both of server and client.
  50 
  51 ClientAuth
  52     If the client authentication is checked, the value is "Y"; otherwise, "N".
  53 
  54 SNI
  55     If the SNI is checked, the value is "Y"; otherwise, "N".
  56 
  57 ALPN
  58     If the ALPN is checked, the value is "Y"; otherwise, "N".
  59 
  60 Status
  61     It indicates the communication status for a test case.
  62     There are three status:
  63     SUCCESS: Communication succeed as expected.
  64     UNEXPECTED_SUCCESS: Communication succeed as unexpected.
  65     FAIL: Communication fails with unexpected failure.
  66     EXPECTED_FAIL: Communication fails with expected failure.
  67     Please note that, if a case finishes as status UNEXPECTED_SUCCESS or FAIL,
  68     that means the case fails. Any failed case results in the test goes to fail.
  69 
  70 ##### Usage #####
  71 jtreg [-options] \
  72     [-Ddebug=<true|false>] \
  73     [-DfullCases=<true|false>] \
  74     [-DfullCipherSuites=<true|false>] \
  75     [-DjdkListFile=</path/to/jdkListFile>] \
  76     $JDK_WORKSPACE/test/jdk/javax/net/ssl/compatibility/Compatibility.java
  77 
  78 Besides the common jtreg options, like -jdk, this test introduces some more
  79 properties:
  80 debug
  81     It indicates if the test enable -Djavax.net.debug=all. This is a boolean
  82     property, and the default value is false.
  83     It is not mandatory.
  84 
  85 fullCases
  86     It indicates if testing the full or mandatory set of parameter values.
  87     Every parameter provides a mandatory value set that must be covered.
  88     For more details about the parameter value sets, please see Parameter.java.
  89     This is a boolean property, and the default value is false.
  90     It is not mandatory.
  91 
  92 fullCipherSuites
  93     It indicates if testing the full or mandatory set of cipher suites.
  94     For more details about the specific cipher suite sets, see CipherSuite in
  95     Parameter.java.
  96     This is a boolean property, and the default value is false.
  97     It is not mandatory.
  98 
  99 jdkListFile
 100     It indicate the path of a file, which lists the absolute paths of different
 101     JDK builds. If no this property, the current testing JDK, specified by JTREG
 102     option -jdk, is used as the testing JDK.
 103     It is not mandatory.
 104 
 105 ##### Usage Examples #####
 106 Example 1
 107 $ jtreg -jdk:/path/to/latest/jdk \
 108     $JDK_WS/jdk/test/javax/net/ssl/compatibility/Compatibility.java
 109 This example doesn't specify any property introduced by the test. That means
 110 it uses the current testing JDK, namely /path/to/latest/jdk, as server and
 111 client. It doesn't output any debug log, and tests only mandatory parameter
 112 value sets.
 113 
 114 Example 2
 115 $ cat /path/to/jdkList
 116 /path/to/jdk7
 117 /path/to/jdk8
 118 /path/to/jdk9
 119 /path/to/jdk10
 120 
 121 $ jtreg -jdk:/path/to/latest/jdk \
 122     -Ddebug=true \
 123     -DfullCipherSuites=true \
 124     -DjdkListFile=/path/to/jdkList \
 125     $JDK_WS/jdk/test/javax/net/ssl/compatibility/Compatibility.java
 126 The above example uses a file "/path/to/jdkList" to contain the paths of local
 127 different JDK builds through 7 to 10. The execution uses each of JDK builds as
 128 server and client respectively. And it enables SSL debug flag, and tests the
 129 full parameter value set.