hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [16/19] 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 Fri, 12 May 2017 08:04:40 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/291d6e36
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/291d6e36
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/291d6e36

Branch: refs/heads/4.4.x
Commit: 291d6e36f072bf97cda26851879d68d2c04ec22d
Parents: 05bd4af
Author: Gary D. Gregory <ggregory@apache.org>
Authored: Tue May 9 21:37:46 2017 +0000
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Fri May 12 09:54:36 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/291d6e36/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