You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 19:58:38 UTC

[46/50] [abbrv] httpcomponents-core git commit: Rename variables "sslcontext" to "sslContext".

Rename variables "sslcontext" to "sslContext".

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk@1793839 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/993ee4d5
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/993ee4d5
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/993ee4d5

Branch: refs/heads/trunk
Commit: 993ee4d5835a69777cfd59cfe5ad21dd4e86568e
Parents: f392d69
Author: Gary D. Gregory <gg...@apache.org>
Authored: Thu May 4 17:52:27 2017 +0000
Committer: Gary D. Gregory <gg...@apache.org>
Committed: Thu May 4 17:52:27 2017 +0000

----------------------------------------------------------------------
 .../examples/Http2SSLRequestExecutionExample.java     |  4 ++--
 .../core5/http/examples/ClassicFileServerExample.java |  6 +++---
 .../org/apache/hc/core5/ssl/SSLContextBuilder.java    | 14 +++++++-------
 .../java/org/apache/hc/core5/ssl/SSLContexts.java     |  6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/993ee4d5/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
----------------------------------------------------------------------
diff --git a/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java b/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
index 0463420..00ef85f 100644
--- a/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
+++ b/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
@@ -67,7 +67,7 @@ public class Http2SSLRequestExecutionExample {
 
     public final static void main(final String[] args) throws Exception {
         // Trust standard CA and those trusted by our custom strategy
-        final SSLContext sslcontext = SSLContexts.custom()
+        final SSLContext sslContext = SSLContexts.custom()
                 .loadTrustMaterial(new TrustStrategy() {
 
                     @Override
@@ -88,7 +88,7 @@ public class Http2SSLRequestExecutionExample {
 
         final HttpAsyncRequester requester = H2RequesterBootstrap.bootstrap()
                 .setH2Config(h2Config)
-                .setTlsStrategy(new H2ClientTlsStrategy(sslcontext, new SSLSessionVerifier() {
+                .setTlsStrategy(new H2ClientTlsStrategy(sslContext, new SSLSessionVerifier() {
 
                     @Override
                     public TlsDetails verify(final NamedEndpoint endpoint, final SSLEngine sslEngine) throws SSLException {

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/993ee4d5/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java b/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
index d590e38..1720658 100644
--- a/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
+++ b/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
@@ -78,7 +78,7 @@ public class ClassicFileServerExample {
             port = Integer.parseInt(args[1]);
         }
 
-        SSLContext sslcontext = null;
+        SSLContext sslContext = null;
         if (port == 8443) {
             // Initialize SSL context
             URL url = ClassicFileServerExample.class.getResource("/my.keystore");
@@ -86,7 +86,7 @@ public class ClassicFileServerExample {
                 System.out.println("Keystore not found");
                 System.exit(1);
             }
-            sslcontext = SSLContexts.custom()
+            sslContext = SSLContexts.custom()
                     .loadKeyMaterial(url, "secret".toCharArray(), "secret".toCharArray())
                     .build();
         }
@@ -99,7 +99,7 @@ public class ClassicFileServerExample {
         final HttpServer server = ServerBootstrap.bootstrap()
                 .setListenerPort(port)
                 .setSocketConfig(socketConfig)
-                .setSslContext(sslcontext)
+                .setSslContext(sslContext)
                 .setExceptionListener(new ExceptionListener() {
 
                     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/993ee4d5/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
index d06d526..5797fd2 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
@@ -265,26 +265,26 @@ public class SSLContextBuilder {
     }
 
     protected void initSSLContext(
-            final SSLContext sslcontext,
+            final SSLContext sslContext,
             final Collection<KeyManager> keyManagers,
             final Collection<TrustManager> trustManagers,
             final SecureRandom secureRandom) throws KeyManagementException {
-        sslcontext.init(
+        sslContext.init(
                 !keyManagers.isEmpty() ? keyManagers.toArray(new KeyManager[keyManagers.size()]) : null,
                 !trustManagers.isEmpty() ? trustManagers.toArray(new TrustManager[trustManagers.size()]) : null,
                 secureRandom);
     }
 
     public SSLContext build() throws NoSuchAlgorithmException, KeyManagementException {
-        final SSLContext sslcontext;
+        final SSLContext sslContext;
         final String protocolStr = this.protocol != null ? this.protocol : TLS;
         if (this.provider != null) {
-            sslcontext = SSLContext.getInstance(protocolStr, this.provider);
+            sslContext = SSLContext.getInstance(protocolStr, this.provider);
         } else {
-            sslcontext = SSLContext.getInstance(protocolStr);
+            sslContext = SSLContext.getInstance(protocolStr);
         }
-        initSSLContext(sslcontext, keymanagers, trustmanagers, secureRandom);
-        return sslcontext;
+        initSSLContext(sslContext, keymanagers, trustmanagers, secureRandom);
+        return sslContext;
     }
 
     static class TrustManagerDelegate implements X509TrustManager {

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/993ee4d5/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
index 6b7de0d..213026b 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
@@ -63,9 +63,9 @@ public final class SSLContexts {
      */
     public static SSLContext createDefault() throws SSLInitializationException {
         try {
-            final SSLContext sslcontext = SSLContext.getInstance(SSLContextBuilder.TLS);
-            sslcontext.init(null, null, null);
-            return sslcontext;
+            final SSLContext sslContext = SSLContext.getInstance(SSLContextBuilder.TLS);
+            sslContext.init(null, null, null);
+            return sslContext;
         } catch (final NoSuchAlgorithmException | KeyManagementException ex) {
             throw new SSLInitializationException(ex.getMessage(), ex);
         }