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/11 18:18:06 UTC

[31/42] 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/242f4c1a
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/242f4c1a
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/242f4c1a

Branch: refs/heads/4.4.x
Commit: 242f4c1a2348335b19fe24396035aeac5495d928
Parents: d953e86
Author: Gary D. Gregory <gg...@apache.org>
Authored: Tue May 9 21:37:46 2017 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu May 11 20:16:44 2017 +0200

----------------------------------------------------------------------
 .../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/242f4c1a/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();
         }