From 9c18e5e1d11167486ec8143a7724be9e8fd5a386 Mon Sep 17 00:00:00 2001 From: amparab Date: Mon, 15 Jan 2024 23:46:01 +0530 Subject: [PATCH] Fixes #39057 : Added keystore type and truststore type in toString --- .../boot/autoconfigure/ssl/PropertiesSslBundle.java | 3 +++ .../springframework/boot/web/server/WebServerSslBundle.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ssl/PropertiesSslBundle.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ssl/PropertiesSslBundle.java index 465d38fb8bef..077c9bf8a3ca 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ssl/PropertiesSslBundle.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ssl/PropertiesSslBundle.java @@ -147,6 +147,9 @@ private static JksSslStoreDetails asStoreDetails(JksSslBundleProperties.Store pr @Override public String toString() { return "PropertiesSslBundle{" + "key-alias=" + this.key.getAlias() + ", protocol='" + this.protocol + '\'' + + ", keystore-type=" + this.stores.getKeyStore().getType() + + ((this.stores.getTrustStore() != null) ? ", truststore-type=" + this.stores.getTrustStore().getType() + : ", truststore=null") + ", ciphers=" + Arrays.toString(this.options.getCiphers()) + ", enabled-protocols=" + Arrays.toString(this.options.getEnabledProtocols()) + '}'; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerSslBundle.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerSslBundle.java index d9dd6b6bb401..1edc520c900f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerSslBundle.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerSslBundle.java @@ -155,6 +155,9 @@ private static boolean hasJavaKeyStoreProperties(Ssl ssl) { @Override public String toString() { return "WebServerSslBundle{" + "key-alias=" + this.key.getAlias() + ", protocol='" + this.protocol + '\'' + + ", keystore-type=" + this.stores.getKeyStore().getType() + + ((this.stores.getTrustStore() != null) ? ", truststore-type=" + this.stores.getTrustStore().getType() + : ", truststore=null") + ", ciphers=" + Arrays.toString(this.options.getCiphers()) + ", enabled-protocols=" + Arrays.toString(this.options.getEnabledProtocols()) + '}'; }