This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch hide_keystore_file_name in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 15fc0e9e1017b2abf6233524c36a4bc31d55fe1a Author: HTHou <[email protected]> AuthorDate: Mon Oct 13 14:34:52 2025 +0800 Hide keystore truststore file name in logs --- .../src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java index 1a62743d2d7..adaf820572f 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java @@ -58,8 +58,10 @@ import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; import java.io.File; +import java.io.FileNotFoundException; import java.io.InputStream; import java.nio.ByteBuffer; +import java.nio.file.AccessDeniedException; import java.nio.file.Files; import java.nio.file.Paths; import java.security.KeyStore; @@ -394,6 +396,10 @@ public class Utils { TrustManager trustManager = new NoHostnameVerificationTrustManager((X509TrustManager) originalTrustManager); GrpcConfigKeys.TLS.setConf(parameters, new GrpcTlsConfig(keyManager, trustManager, true)); + } catch (AccessDeniedException e) { + LOGGER.error("Failed or truststore to load keystore file"); + } catch (FileNotFoundException e) { + LOGGER.error("keystore or truststore file not found"); } catch (Exception e) { LOGGER.error("Failed to read key store or trust store.", e); }
