F-13481: close the keystore input stream on load failures in loadKeyStoreFileByType
parent
537254ec10
commit
e785be5c46
|
|
@ -777,11 +777,17 @@ public class WolfSSLUtil {
|
|||
|
||||
stream = new FileInputStream(file);
|
||||
ks.load(stream, pass);
|
||||
stream.close();
|
||||
|
||||
} catch (KeyStoreException | IOException | NoSuchAlgorithmException |
|
||||
CertificateException e) {
|
||||
return null;
|
||||
} finally {
|
||||
try {
|
||||
if (stream != null) {
|
||||
stream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
return ks;
|
||||
|
|
|
|||
Loading…
Reference in New Issue