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/10 07:33:53 UTC

[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.

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 <gg...@apache.org>
Authored: Tue May 9 21:37:46 2017 +0000
Committer: Gary D. Gregory <gg...@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();
         }