properties.list(debugPrinter);
log.debug(
"Runtime configuration parameters: " + System.getProperty("line.separator") + debugStream.toString());
+ try {
+ debugStream.close();
+ } catch (IOException e) {
+ log.error("Encountered a problem cleaning up resources: could not close debug stream.");
+ }
}
return properties;
InputStream inStream = new ShibResource(fileName).getInputStream();
DOMParser parser = new DOMParser();
parser.parse(new InputSource(inStream));
+ inStream.close();
return parser.getDocument().getDocumentElement();
}
properties.list(debugPrinter);
log.debug(
"Runtime configuration parameters: " + System.getProperty("line.separator") + debugStream.toString());
+ try {
+ debugStream.close();
+ } catch (IOException e) {
+ log.error("Encountered a problem cleaning up resources: could not close debug stream.");
+ }
}
return properties;
postProfile =
ShibPOSTProfileFactory.getInstance(
- Arrays.asList(configuration.getProperty("edu.internet2.middleware.shibboleth.audiences").replaceAll("\\s", "") .split(",")),
+ Arrays.asList(
+ configuration.getProperty("edu.internet2.middleware.shibboleth.audiences").replaceAll(
+ "\\s",
+ "").split(
+ ",")),
configuration.getProperty("edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer"));
handleRepository = HandleRepositoryFactory.getInstance(configuration);
Arrays.asList(certificates),
null,
null);
-
+
return r.toBase64();
}
objectStream.flush();
objectStream.close();
+
Cipher cipher = Cipher.getInstance("DESede/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secret);
byte[] cipherTextHandle = cipher.doFinal(outStream.toByteArray());
+ zipStream.close();
+ outStream.close();
String handle = new BASE64Encoder().encode(cipherTextHandle);
return handle.replaceAll(System.getProperty("line.separator"), "");
ObjectInputStream objectStream =
new ObjectInputStream(new GZIPInputStream(new ByteArrayInputStream(objectArray)));
HandleEntry handleEntry = (HandleEntry) objectStream.readObject();
+ objectStream.close();
return handleEntry.principal;
} catch (Exception e) {