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/09 21:37:46 UTC

svn commit: r1794638 - /httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java

Author: ggregory
Date: Tue May  9 21:37:46 2017
New Revision: 1794638

URL: http://svn.apache.org/viewvc?rev=1794638&view=rev
Log:
Change the example's hard-coded strings so that you can actually run it with SSL out of the box.

Modified:
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java?rev=1794638&r1=1794637&r2=1794638&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java Tue May  9 21:37:46 2017
@@ -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();
         }