geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r470482 - /geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java
Date Thu, 02 Nov 2006 19:18:37 GMT
Author: vamsic007
Date: Thu Nov  2 11:18:35 2006
New Revision: 470482

URL: http://svn.apache.org/viewvc?view=rev&rev=470482
Log:
GERONIMO-2436 FileKeystoreInstance.generateKeyPair() should check if the keystore is loaded

Modified:
    geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java

Modified: geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java?view=diff&rev=470482&r1=470481&r2=470482
==============================================================================
--- geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java
(original)
+++ geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/keystore/FileKeystoreInstance.java
Thu Nov  2 11:18:35 2006
@@ -273,6 +273,11 @@
     }
 
     public boolean generateKeyPair(String alias, char[] storePassword, char[] keyPassword,
String keyAlgorithm, int keySize, String signatureAlgorithm, int validity, String commonName,
String orgUnit, String organization, String locality, String state, String country) {
+        if(!isLoaded(storePassword)) {
+            if(!loadKeystoreData(storePassword)) {
+                return false;
+            }
+        }
         try {
             KeyPairGenerator kpgen = KeyPairGenerator.getInstance(keyAlgorithm);
             kpgen.initialize(keySize);



Mime
View raw message