hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1794638 - /httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
Date Tue, 09 May 2017 21:37:46 GMT
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();
         }
 



Mime
View raw message