diff --git a/CASA-auth-token/server-java/Svc/src/com/novell/casa/authtoksvc/SecureTokenUtil.java b/CASA-auth-token/server-java/Svc/src/com/novell/casa/authtoksvc/SecureTokenUtil.java index 6fec4245..5fdf4d61 100644 --- a/CASA-auth-token/server-java/Svc/src/com/novell/casa/authtoksvc/SecureTokenUtil.java +++ b/CASA-auth-token/server-java/Svc/src/com/novell/casa/authtoksvc/SecureTokenUtil.java @@ -180,6 +180,7 @@ public final class SecureTokenUtil { Map x509ISNCertMap; InputStream inStream = null; + FileInputStream fis = null; try { // Load our crypto properties @@ -202,7 +203,7 @@ public final class SecureTokenUtil // Instantiate and load the keystore KeyStore keyStore = KeyStore.getInstance(keystoreType); - FileInputStream fis = new FileInputStream(keystoreFile); + fis = new FileInputStream(keystoreFile); keyStore.load(fis, keystorePass.toCharArray()); // Create the Certificate issuer:sn map @@ -220,9 +221,12 @@ public final class SecureTokenUtil } finally { - // Make sure that the input stream has been closed + // Make sure that the streams have been closed if (inStream != null) inStream.close(); + + if (fis != null) + fis.close(); } return x509ISNCertMap;