From 5051b754bf0c91e9a961ab575da586430420a9f0 Mon Sep 17 00:00:00 2001 From: Hans Van Akelyen Date: Fri, 18 Oct 2024 15:18:02 +0200 Subject: [PATCH] fix truststore issue in rest --- .../org/apache/hop/pipeline/transforms/rest/Rest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java index 960371931e2..d6be4a0a8ae 100644 --- a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java +++ b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java @@ -113,13 +113,9 @@ protected Object[] callRest(Object[] rowData) throws HopException { .withConfig(data.config) .property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); - if (!Utils.isEmpty(data.trustStoreFile)) { - clientBuilder.sslContext(data.sslContext); - } - - // Ignore SSL is selected disable hostname verifier - if (meta.isIgnoreSsl()) { + if (meta.isIgnoreSsl() || !Utils.isEmpty(data.trustStoreFile)) { clientBuilder.hostnameVerifier((s1, s2) -> true); + clientBuilder.sslContext(data.sslContext); } client = clientBuilder.build();