geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r657181 - /geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
Date Fri, 16 May 2008 19:26:36 GMT
Author: gawor
Date: Fri May 16 12:26:35 2008
New Revision: 657181

URL: http://svn.apache.org/viewvc?rev=657181&view=rev
Log:
ignore Windows-MY and Windows-ROOT keystores (GERONIMO-3864)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java

Modified: geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java?rev=657181&r1=657180&r2=657181&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
Fri May 16 12:26:35 2008
@@ -25,6 +25,7 @@
 import java.security.cert.Certificate;
 import java.security.cert.CertificateFactory;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.Set;
 import java.util.TreeSet;
 
@@ -50,6 +51,10 @@
     public static final String defaultType;
 
     static {
+        Set<String> ignoreKeystores = new HashSet<String>();
+        ignoreKeystores.add("windows-my");
+        ignoreKeystores.add("windows-root");
+        
         TreeSet<String> tempKeystoreTypes = new TreeSet<String>();
         TreeSet<String> tempEmptyKeystoreTypes = new TreeSet<String>();
         TreeSet<String> tempCertKeystoreTypes = new TreeSet<String>();
@@ -77,8 +82,10 @@
         }
         for(Provider provider: providers) {
             for(Provider.Service service: provider.getServices()) {
-                if(service.getType().equals("KeyStore")) {
-                    String type = service.getAlgorithm();
+                String type = service.getAlgorithm();
+                if (service.getType().equals("KeyStore") && 
+                    !ignoreKeystores.contains(type.toLowerCase())) {
+
                     tempKeystoreTypes.add(type);
                     if(type.equalsIgnoreCase(KeyStore.getDefaultType())) {
                         tempDefaultType = type;



Mime
View raw message