8256660: Disable DTLS 1.0

Reviewed-by: xuelei, hchao, wetmore
This commit is contained in:
Sean Mullan 2022-10-31 16:46:40 +00:00
parent f4d8c20c3b
commit 16744b3449
3 changed files with 51 additions and 29 deletions

View file

@ -1287,7 +1287,7 @@ public abstract class SSLContextImpl extends SSLContextSpi {
}
/*
* The SSLContext implementation for customized TLS protocols
* The SSLContext implementation for customized DTLS protocols
*
* @see SSLContext
*/
@ -1345,13 +1345,11 @@ public abstract class SSLContextImpl extends SSLContextSpi {
ProtocolVersion.DTLS12,
ProtocolVersion.DTLS10
};
if (!client)
return Arrays.asList(candidates);
} else {
// Use the customized TLS protocols.
candidates =
new ProtocolVersion[customized.size()];
candidates = customized.toArray(candidates);
candidates = refactored.toArray(candidates);
}
return getAvailableProtocols(candidates);