changeset 57175:d8b5e32ffa2f

8235183: Remove the "HACK CODE" in comment Reviewed-by: jnimeh
author xuelei
date Mon, 02 Dec 2019 10:42:27 -0800
parents 2baa1f8721b8
children f794ce3de310 8991f75a1409
files src/java.base/share/classes/sun/security/ssl/NamedGroup.java src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java src/java.base/share/classes/sun/security/ssl/SignatureScheme.java
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/ssl/NamedGroup.java	Mon Dec 02 18:52:18 2019 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/NamedGroup.java	Mon Dec 02 10:42:27 2019 -0800
@@ -254,10 +254,10 @@
         AlgorithmParameters algParams = null;
         boolean mediator = (keAlgParamSpec != null);
 
-        // HACK CODE
-        //
         // An EC provider, for example the SunEC provider, may support
         // AlgorithmParameters but not KeyPairGenerator or KeyAgreement.
+        //
+        // Note: Please be careful if removing this block!
         if (mediator && (namedGroupSpec == NamedGroupSpec.NAMED_GROUP_ECDHE)) {
             mediator = JsseJce.isEcAvailable();
         }
@@ -277,10 +277,10 @@
                             "No AlgorithmParameters for " + name, exp);
                     }
                 } else {
-                    // HACK CODE
-                    //
                     // Please remove the following code if the XDH/X25519/X448
                     // AlgorithmParameters algorithms are supported in JDK.
+                    //
+                    // Note: Please be careful if removing this block!
                     algParams = null;
                     try {
                         KeyAgreement.getInstance(name);
--- a/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java	Mon Dec 02 18:52:18 2019 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java	Mon Dec 02 10:42:27 2019 -0800
@@ -381,7 +381,7 @@
                             "Requested to negotiate unsupported SSLv2!");
                 }
 
-                // hack code, the exception is caught in SSLEngineImpl
+                // Note that the exception is caught in SSLEngineImpl
                 // so that SSLv2 error message can be delivered properly.
                 throw new UnsupportedOperationException(        // SSLv2Hello
                         "Unsupported SSL v2.0 ClientHello");
--- a/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java	Mon Dec 02 18:52:18 2019 +0100
+++ b/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java	Mon Dec 02 10:42:27 2019 -0800
@@ -274,10 +274,10 @@
                 Arrays.asList(handshakeSupportedProtocols);
 
         boolean mediator = true;
-        // HACK CODE
-        //
         // An EC provider, for example the SunEC provider, may support
         // AlgorithmParameters but not KeyPairGenerator or Signature.
+        //
+        // Note: Please be careful if removing this block!
         if ("EC".equals(keyAlgorithm)) {
             mediator = JsseJce.isEcAvailable();
         }