X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FGigiConfig.java;h=8b7c220202f83e8b3b07724fb57824c9fb49f368;hp=4c36302abaca89c52ef66ba8ca32681686562bd5;hb=73ac9fa5e36efef14464f40294e43ef85fadf320;hpb=943d8e7ed0ea5a9d56e7e694a3cbd849c52bad16 diff --git a/src/org/cacert/gigi/GigiConfig.java b/src/org/cacert/gigi/GigiConfig.java index 4c36302a..8b7c2202 100644 --- a/src/org/cacert/gigi/GigiConfig.java +++ b/src/org/cacert/gigi/GigiConfig.java @@ -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;