cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1520313 - in /cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src: main/java/org/apache/cxf/xkms/x509/repo/file/ test/java/org/apache/cxf/xkms/x509/repo/file/ test/resources/store1/
Date Thu, 05 Sep 2013 14:02:09 GMT
Author: coheigea
Date: Thu Sep  5 14:02:08 2013
New Revision: 1520313

URL: http://svn.apache.org/r1520313
Log:
Merged revisions 1520312 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1520312 | coheigea | 2013-09-05 14:59:46 +0100 (Thu, 05 Sep 2013) | 2 lines

  [CXF-5250] - Too long the cer file name generated by XKMS service

........

Added:
    cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689.cer
      - copied, changed from r1520301, cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer
Removed:
    cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer
Modified:
    cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepo.java
    cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepoTest.java

Modified: cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepo.java?rev=1520313&r1=1520312&r2=1520313&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepo.java
(original)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepo.java
Thu Sep  5 14:02:08 2013
@@ -82,7 +82,7 @@ public class FileCertificateRepo impleme
         }
         try {
             File certFile = new File(storageDir + "/" + category,
-                                     getRelativePathForSubjectDn(id.getIdentifier(), cert));
+                                     getRelativePathForSubjectDn(cert));
             certFile.getParentFile().mkdirs();
             FileOutputStream fos = new FileOutputStream(certFile);
             BufferedOutputStream bos = new BufferedOutputStream(fos);
@@ -107,12 +107,11 @@ public class FileCertificateRepo impleme
         return result;
     }
 
-    public String getRelativePathForSubjectDn(String subjectDn, X509Certificate cert)
+    public String getRelativePathForSubjectDn(X509Certificate cert)
         throws URISyntaxException {
         BigInteger serialNumber = cert.getSerialNumber();
         String issuer = cert.getIssuerX500Principal().getName();
-        String path = convertDnForFileSystem(subjectDn) + "-" + serialNumber.toString() +
"-"
-                      + convertDnForFileSystem(issuer) + ".cer";
+        String path = convertDnForFileSystem(issuer) + "-" + serialNumber.toString() + ".cer";
         Pattern p = Pattern.compile("[a-zA-Z_0-9-_]");
         if (p.matcher(path).find()) {
             return path;

Modified: cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepoTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepoTest.java?rev=1520313&r1=1520312&r2=1520313&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepoTest.java
(original)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/repo/file/FileCertificateRepoTest.java
Thu Sep  5 14:02:08 2013
@@ -39,8 +39,8 @@ import org.junit.Test;
 
 public class FileCertificateRepoTest {
     private static final String EXAMPLE_SUBJECT_DN = "CN=www.issuer.com, L=CGN, ST=NRW, C=DE,
O=Issuer";
-    private static final String EXPECTED_CERT_FILE_NAME = "CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-"
-                                + "11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer";
+    private static final String EXPECTED_CERT_FILE_NAME = 
+        "CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689.cer";
 
     @Test
     public void testSaveAndFind() throws CertificateException, IOException {

Copied: cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689.cer
(from r1520301, cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer)
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689.cer?p2=cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689.cer&p1=cxf/branches/2.7.x-fixes/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer&r1=1520301&r2=1520313&rev=1520313&view=diff
==============================================================================
    (empty)



Mime
View raw message