Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
8235183: Remove the "HACK CODE" in comment
Browse files Browse the repository at this point in the history
Reviewed-by: jnimeh
  • Loading branch information
XueleiFan committed Dec 2, 2019
1 parent ff2f628 commit 50714b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/java.base/share/classes/sun/security/ssl/NamedGroup.java
Expand Up @@ -254,10 +254,10 @@ private NamedGroup(int id, String name,
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();
}
Expand All @@ -277,10 +277,10 @@ private NamedGroup(int id, String name,
"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);
Expand Down
Expand Up @@ -381,7 +381,7 @@ private Plaintext[] handleUnknownRecord(ByteBuffer packet)
"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");
Expand Down
Expand Up @@ -274,10 +274,10 @@ private SignatureScheme(int id, String name,
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();
}
Expand Down

0 comments on commit 50714b0

Please sign in to comment.