Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 211879981 for ; Wed, 15 May 2013 21:00:49 +0000 (UTC) Received: (qmail 71453 invoked by uid 500); 15 May 2013 21:00:49 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 71390 invoked by uid 500); 15 May 2013 21:00:49 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 71382 invoked by uid 99); 15 May 2013 21:00:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 21:00:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 21:00:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E149723889ED; Wed, 15 May 2013 21:00:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1483079 - /qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java Date: Wed, 15 May 2013 21:00:27 -0000 To: commits@qpid.apache.org From: rajith@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130515210027.E149723889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajith Date: Wed May 15 21:00:27 2013 New Revision: 1483079 URL: http://svn.apache.org/r1483079 Log: QPID-4849 The previous code was assuming that "CN" was the first entry in the name string. Changed the code to first find "CN" and then extract from there. testMultipleCertsInSingleStore verifies this change. Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java?rev=1483079&r1=1483078&r2=1483079&view=diff ============================================================================== --- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java (original) +++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java Wed May 15 21:00:27 2013 @@ -95,8 +95,9 @@ public class SSLUtil if (dn.contains("CN=")) { - id.append(dn.substring(3, - dn.indexOf(",") == -1? dn.length(): dn.indexOf(","))); + String str = dn.substring(dn.indexOf("CN=")+3, dn.length()); + id.append(str.substring(0, + str.indexOf(",") == -1? str.length(): str.indexOf(","))); } if (dn.contains("DC=")) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org