hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [06/13] httpcomponents-core git commit: Change the example's hard-coded strings so that you can actually run it with SSL out of the box.
Date Wed, 10 May 2017 07:33:53 GMT
Change the example's hard-coded strings so that you can actually run it with SSL out of the
box.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.4.x@1794638
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/8b6a310f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/8b6a310f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/8b6a310f

Branch: refs/heads/4.4.x
Commit: 8b6a310f21b5ddc5ac3ba7c242fdd2ac1471b967
Parents: c9810ec
Author: Gary D. Gregory <ggregory@apache.org>
Authored: Tue May 9 21:37:46 2017 +0000
Committer: Gary D. Gregory <ggregory@apache.org>
Committed: Tue May 9 21:37:46 2017 +0000

----------------------------------------------------------------------
 .../examples/org/apache/http/examples/nio/NHttpFileServer.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/8b6a310f/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
index 612c02e..56dba42 100644
--- a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
+++ b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
@@ -78,13 +78,13 @@ public class NHttpFileServer {
         SSLContext sslContext = null;
         if (port == 8443) {
             // Initialize SSL context
-            URL url = NHttpFileServer.class.getResource("/my.keystore");
+            URL url = NHttpFileServer.class.getResource("/test.keystore");
             if (url == null) {
                 System.out.println("Keystore not found");
                 System.exit(1);
             }
             sslContext = SSLContexts.custom()
-                    .loadKeyMaterial(url, "secret".toCharArray(), "secret".toCharArray())
+                    .loadKeyMaterial(url, "nopassword".toCharArray(), "nopassword".toCharArray())
                     .build();
         }
 


Mime
View raw message