fix(接口测试): 加载证书时没有关闭输入流
This commit is contained in:
parent
04abe38601
commit
ae9a453ba7
|
@ -155,9 +155,9 @@ public abstract class SSLManager {
|
||||||
if (StringUtils.isNotBlank(resourceId) && keyMap.containsKey(resourceId)) {
|
if (StringUtils.isNotBlank(resourceId) && keyMap.containsKey(resourceId)) {
|
||||||
KeystoreDTO dto = keyMap.get(resourceId);
|
KeystoreDTO dto = keyMap.get(resourceId);
|
||||||
// 加载认证文件
|
// 加载认证文件
|
||||||
InputStream in = new FileInputStream(new File(dto.getPath()));
|
try (InputStream in = new FileInputStream(new File(dto.getPath()))) {
|
||||||
this.keyStore.load(in, dto.getPwd());
|
this.keyStore.load(in, dto.getPwd());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue