From aa9d73c6b256db00c28585457b2e5d5393c84cdd Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 20 Apr 2015 15:58:51 -0700 Subject: [PATCH] Fix SslContextBuilder swapping client and server The 'forClient' boolean was swapped to 'forServer' in code review of #3531. Not all locations were updated. --- .../main/java/io/netty/handler/ssl/SslContextBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java b/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java index e935e7c8b3..fcc840e6ca 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java @@ -31,7 +31,7 @@ public final class SslContextBuilder { * Creates a builder for new client-side {@link SslContext}. */ public static SslContextBuilder forClient() { - return new SslContextBuilder(true); + return new SslContextBuilder(false); } /** @@ -41,7 +41,7 @@ public final class SslContextBuilder { * @param keyFile a PKCS#8 private key file in PEM format */ public static SslContextBuilder forServer(File keyCertChainFile, File keyFile) { - return new SslContextBuilder(false).keyManager(keyCertChainFile, keyFile); + return new SslContextBuilder(true).keyManager(keyCertChainFile, keyFile); } /** @@ -54,7 +54,7 @@ public final class SslContextBuilder { */ public static SslContextBuilder forServer( File keyCertChainFile, File keyFile, String keyPassword) { - return new SslContextBuilder(false).keyManager(keyCertChainFile, keyFile, keyPassword); + return new SslContextBuilder(true).keyManager(keyCertChainFile, keyFile, keyPassword); } private final boolean forServer;