- gc.keystorpw = transformSafe(readChunk(dis));
- gc.truststorepw = transformSafe(readChunk(dis));
- gc.mainProps.load(new ByteArrayInputStream(readChunk(dis)));
- gc.cacerts = readChunk(dis);
- gc.keystore = readChunk(dis);
+ while ((t = tis.getNextEntry()) != null) {
+ if (t.getName().equals("gigi.properties")) {
+ gc.mainProps.load(tis);
+ } else if (t.getName().equals("cacerts.jks")) {
+ gc.cacerts = readFully(tis);
+ } else if (t.getName().equals("keystore.pkcs12")) {
+ gc.keystore = readFully(tis);
+ } else if (t.getName().equals("keystorepw")) {
+ gc.keystorpw = transformSafe(readFully(tis));
+ } else if (t.getName().equals("truststorepw")) {
+ gc.truststorepw = transformSafe(readFully(tis));
+ } else {
+ System.out.println("Unknown config: " + t.getName());
+ }
+ }
+ tis.close();