You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/08/01 09:35:46 UTC

camel git commit: CAMEL-9020 : polished - only set TLS when using https

Repository: camel
Updated Branches:
  refs/heads/master 7bb39d584 -> d5dcb1bd3


CAMEL-9020 : polished - only set TLS when using https


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d5dcb1bd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d5dcb1bd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d5dcb1bd

Branch: refs/heads/master
Commit: d5dcb1bd3551303733074332bccedb6eefe63f2d
Parents: 7bb39d5
Author: Preben Asmussen <pr...@gmail.com>
Authored: Fri Jul 31 17:41:17 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 1 09:43:06 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/splunk/SplunkConfiguration.java  | 2 +-
 .../apache/camel/component/splunk/SplunkConnectionFactory.java  | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d5dcb1bd/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConfiguration.java b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConfiguration.java
index 9939a3e..daff832 100644
--- a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConfiguration.java
+++ b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConfiguration.java
@@ -32,7 +32,7 @@ public class SplunkConfiguration {
 
     @UriPath(description = "Name has no purpose") @Metadata(required = "true")
     private String name;
-    @UriParam(defaultValue = "http")
+    @UriParam(defaultValue = "https")
     private String scheme = Service.DEFAULT_SCHEME;
     @UriParam(defaultValue = "localhost")
     private String host = Service.DEFAULT_HOST;

http://git-wip-us.apache.org/repos/asf/camel/blob/d5dcb1bd/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
index 46fba1b..7f950ba 100644
--- a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
+++ b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkConnectionFactory.java
@@ -133,7 +133,10 @@ public class SplunkConnectionFactory {
 
         Future<Service> future = executor.submit(new Callable<Service>() {
             public Service call() throws Exception {
-                Service.setSslSecurityProtocol(getSslProtocol());
+                if (Service.DEFAULT_SCHEME.equals(getScheme())) {
+                    LOG.debug("Https in use. Setting SSL protocol to {}", getSslProtocol());
+                    Service.setSslSecurityProtocol(getSslProtocol());
+                }
                 return Service.connect(args);
             }
         });