8233954: UnsatisfiedLinkError or NoSuchAlgorithmException after removing sunec.dll
Reviewed-by: ascarpino
This commit is contained in:
parent
8c6eb44946
commit
5161ab9493
@ -250,8 +250,19 @@ enum NamedGroup {
|
|||||||
this.supportedProtocols = supportedProtocols;
|
this.supportedProtocols = supportedProtocols;
|
||||||
this.keAlgParamSpec = keAlgParamSpec;
|
this.keAlgParamSpec = keAlgParamSpec;
|
||||||
|
|
||||||
|
// Check if it is a supported named group.
|
||||||
AlgorithmParameters algParams = null;
|
AlgorithmParameters algParams = null;
|
||||||
boolean mediator = (keAlgParamSpec != null);
|
boolean mediator = (keAlgParamSpec != null);
|
||||||
|
|
||||||
|
// HACK CODE
|
||||||
|
//
|
||||||
|
// An EC provider, for example the SunEC provider, may support
|
||||||
|
// AlgorithmParameters but not KeyPairGenerator or KeyAgreement.
|
||||||
|
if (mediator && (namedGroupSpec == NamedGroupSpec.NAMED_GROUP_ECDHE)) {
|
||||||
|
mediator = JsseJce.isEcAvailable();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the specific algorithm parameters.
|
||||||
if (mediator) {
|
if (mediator) {
|
||||||
try {
|
try {
|
||||||
algParams =
|
algParams =
|
||||||
|
@ -274,17 +274,28 @@ enum SignatureScheme {
|
|||||||
Arrays.asList(handshakeSupportedProtocols);
|
Arrays.asList(handshakeSupportedProtocols);
|
||||||
|
|
||||||
boolean mediator = true;
|
boolean mediator = true;
|
||||||
if (signAlgParams != null) {
|
// HACK CODE
|
||||||
mediator = signAlgParams.isAvailable;
|
//
|
||||||
} else {
|
// An EC provider, for example the SunEC provider, may support
|
||||||
try {
|
// AlgorithmParameters but not KeyPairGenerator or Signature.
|
||||||
Signature.getInstance(algorithm);
|
if ("EC".equals(keyAlgorithm)) {
|
||||||
} catch (Exception e) {
|
mediator = JsseJce.isEcAvailable();
|
||||||
mediator = false;
|
}
|
||||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
|
||||||
SSLLogger.warning(
|
// Check the specific algorithm and parameters.
|
||||||
"Signature algorithm, " + algorithm +
|
if (mediator) {
|
||||||
", is not supported by the underlying providers");
|
if (signAlgParams != null) {
|
||||||
|
mediator = signAlgParams.isAvailable;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
Signature.getInstance(algorithm);
|
||||||
|
} catch (Exception e) {
|
||||||
|
mediator = false;
|
||||||
|
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
||||||
|
SSLLogger.warning(
|
||||||
|
"Signature algorithm, " + algorithm +
|
||||||
|
", is not supported by the underlying providers");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user