Skip to content
Permalink
Browse files
8235183: Remove the "HACK CODE" in comment
Backport-of: 50714b0
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Nov 27, 2020
1 parent e91e43b commit dabaf4e9475ee21af08bc615e6a9be95df0c161f
@@ -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();
}
@@ -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);
@@ -390,7 +390,7 @@ private int bytesInCompletePacket(ByteBuffer packet) throws SSLException {
"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");
@@ -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();
}

1 comment on commit dabaf4e

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on dabaf4e Nov 27, 2020

Please sign in to comment.