]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/GigiConfig.java
upd: use bootstrap class for button
[gigi.git] / src / org / cacert / gigi / GigiConfig.java
index 4c36302abaca89c52ef66ba8ca32681686562bd5..8b7c220202f83e8b3b07724fb57824c9fb49f368 100644 (file)
@@ -15,11 +15,11 @@ public class GigiConfig {
 
     public static final String GIGI_CONFIG_VERSION = "GigiConfigV1.0";
 
-    byte[] cacerts;
+    private byte[] cacerts;
 
-    byte[] keystore;
+    private byte[] keystore;
 
-    Properties mainProps = new Properties();
+    private Properties mainProps = new Properties();
 
     private char[] keystorpw;
 
@@ -83,6 +83,9 @@ public class GigiConfig {
     }
 
     public KeyStore getPrivateStore() throws GeneralSecurityException, IOException {
+        if (keystore == null || keystorpw == null) {
+            return null;
+        }
         KeyStore ks1 = KeyStore.getInstance("pkcs12");
         ks1.load(new ByteArrayInputStream(keystore), keystorpw);
         return ks1;