mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8156715: TrustStoreManager does not buffer keystore input stream
Reviewed-by: ascarpino
This commit is contained in:
parent
5c1f77fab1
commit
2af869b193
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -376,9 +376,10 @@ final class TrustStoreManager {
|
||||
}
|
||||
|
||||
if (!"NONE".equals(descriptor.storeName)) {
|
||||
try (FileInputStream fis =
|
||||
new FileInputStream(descriptor.storeFile)) {
|
||||
ks.load(fis, password);
|
||||
try (BufferedInputStream bis =
|
||||
new BufferedInputStream(
|
||||
new FileInputStream(descriptor.storeFile))) {
|
||||
ks.load(bis, password);
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
// No file available, no KeyStore available.
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user