mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8235655: Clean the duplicated block in SSLContextImpl
Reviewed-by: coffeys
This commit is contained in:
parent
11d4e9f34d
commit
c185319515
1 changed files with 6 additions and 17 deletions
|
@ -841,24 +841,13 @@ public abstract class SSLContextImpl extends SSLContextSpi {
|
|||
// Use the default enabled protocols if no customization
|
||||
ProtocolVersion[] candidates;
|
||||
if (refactored.isEmpty()) {
|
||||
if (client) {
|
||||
// default client protocols
|
||||
candidates = new ProtocolVersion[] {
|
||||
ProtocolVersion.TLS13,
|
||||
ProtocolVersion.TLS12,
|
||||
ProtocolVersion.TLS11,
|
||||
ProtocolVersion.TLS10
|
||||
};
|
||||
|
||||
} else {
|
||||
// default server protocols
|
||||
candidates = new ProtocolVersion[] {
|
||||
ProtocolVersion.TLS13,
|
||||
ProtocolVersion.TLS12,
|
||||
ProtocolVersion.TLS11,
|
||||
ProtocolVersion.TLS10
|
||||
// Client and server use the same default protocols.
|
||||
candidates = new ProtocolVersion[] {
|
||||
ProtocolVersion.TLS13,
|
||||
ProtocolVersion.TLS12,
|
||||
ProtocolVersion.TLS11,
|
||||
ProtocolVersion.TLS10
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// Use the customized TLS protocols.
|
||||
candidates =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue