qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
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 GMT
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


Mime
View raw message