Use default parameters wherever possible to initialize SSLContexts

This commit is contained in:
Trustin Lee 2010-01-25 11:26:55 +00:00
parent 2e477b87c2
commit d5ad5a47ac

View File

@ -58,9 +58,7 @@ public class SecureChatSslContextFactory {
// Initialize the SSLContext to work with our key managers.
serverContext = SSLContext.getInstance(PROTOCOL);
serverContext.init(
kmf.getKeyManagers(),
SecureChatTrustManagerFactory.getTrustManagers(), null);
serverContext.init(kmf.getKeyManagers(), null, null);
} catch (Exception e) {
throw new Error(
"Failed to initialize the server-side SSLContext", e);
@ -68,8 +66,7 @@ public class SecureChatSslContextFactory {
try {
clientContext = SSLContext.getInstance(PROTOCOL);
clientContext.init(
null, SecureChatTrustManagerFactory.getTrustManagers(), null);
clientContext.init(null, SecureChatTrustManagerFactory.getTrustManagers(), null);
} catch (Exception e) {
throw new Error(
"Failed to initialize the client-side SSLContext", e);