This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.x by this push: new e1fd90ec91d CAMEL-19691: camel-kafka - Allow sslKeystorePassword to be blank. (#10973) e1fd90ec91d is described below commit e1fd90ec91dd0d5df57832942fe25c569eee3825 Author: Vaishnavi R <66722776+vaishnavi...@users.noreply.github.com> AuthorDate: Thu Aug 3 22:41:40 2023 +0530 CAMEL-19691: camel-kafka - Allow sslKeystorePassword to be blank. (#10973) CAMEL-19691: camel-kafka - Allow sslKeystorePassword to be blank. CAMEL-19691: camel-kafka - Allow sslKeystorePassword to be blank. --- .../java/org/apache/camel/component/kafka/KafkaConfiguration.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java index 67448d67b30..581fc4f15b2 100755 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java @@ -422,7 +422,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware private void applyProducerSslConfiguration(Properties props) { if (securityProtocol.equals(SecurityProtocol.SSL.name()) || securityProtocol.equals(SecurityProtocol.SASL_SSL.name())) { addPropertyIfNotEmpty(props, CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, getSecurityProtocol()); - addPropertyIfNotEmpty(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword()); + addPropertyIfNotNull(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword()); addPropertyIfNotEmpty(props, SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, getSslKeystoreLocation()); addPropertyIfNotEmpty(props, SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, getSslKeystorePassword()); addPropertyIfNotEmpty(props, SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, getSslTruststoreLocation()); @@ -503,7 +503,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware private void applySslConsumerConfigurationFromOptions(Properties props) { if (securityProtocol.equals(SecurityProtocol.SSL.name()) || securityProtocol.equals(SecurityProtocol.SASL_SSL.name())) { - addPropertyIfNotEmpty(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword()); + addPropertyIfNotNull(props, SslConfigs.SSL_KEY_PASSWORD_CONFIG, getSslKeyPassword()); addPropertyIfNotEmpty(props, SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, getSslKeystoreLocation()); addPropertyIfNotEmpty(props, SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, getSslKeystorePassword()); addPropertyIfNotEmpty(props, SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, getSslTruststoreLocation()); @@ -1876,3 +1876,4 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware this.isolationLevel = isolationLevel; } } +