You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/05/04 17:52:28 UTC
svn commit: r1793839 - in /httpcomponents/httpcore/trunk:
httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/
httpcore5/src/examples/org/apache/hc/core5/http/examples/
httpcore5/src/main/java/org/apache/hc/core5/ssl/
Author: ggregory
Date: Thu May 4 17:52:27 2017
New Revision: 1793839
URL: http://svn.apache.org/viewvc?rev=1793839&view=rev
Log:
Rename variables "sslcontext" to "sslContext".
Modified:
httpcomponents/httpcore/trunk/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
httpcomponents/httpcore/trunk/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java?rev=1793839&r1=1793838&r2=1793839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/examples/org/apache/hc/core5/http/examples/Http2SSLRequestExecutionExample.java Thu May 4 17:52:27 2017
@@ -67,7 +67,7 @@ public class Http2SSLRequestExecutionExa
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 Http2SSLRequestExecutionExa
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 {
Modified: httpcomponents/httpcore/trunk/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java?rev=1793839&r1=1793838&r2=1793839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/examples/org/apache/hc/core5/http/examples/ClassicFileServerExample.java Thu May 4 17:52:27 2017
@@ -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
Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java?rev=1793839&r1=1793838&r2=1793839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContextBuilder.java Thu May 4 17:52:27 2017
@@ -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 {
Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java?rev=1793839&r1=1793838&r2=1793839&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLContexts.java Thu May 4 17:52:27 2017
@@ -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);
}