Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7D2AE200CAA for ; Fri, 12 May 2017 10:04:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7BFC7160BD6; Fri, 12 May 2017 08:04:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF263160BCF for ; Fri, 12 May 2017 10:04:27 +0200 (CEST) Received: (qmail 32013 invoked by uid 500); 12 May 2017 08:04:26 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 31499 invoked by uid 99); 12 May 2017 08:04:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2017 08:04:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C94FEF1596; Fri, 12 May 2017 08:04:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: olegk@apache.org To: commits@hc.apache.org Date: Fri, 12 May 2017 08:04:40 -0000 Message-Id: In-Reply-To: <663d46d94cd04b02bfdd46a09d55228d@git.apache.org> References: <663d46d94cd04b02bfdd46a09d55228d@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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. archived-at: Fri, 12 May 2017 08:04:28 -0000 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 Authored: Tue May 9 21:37:46 2017 +0000 Committer: Oleg Kalnichevski 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(); }