[
https://issues.apache.org/jira/browse/GOBBLIN-1429?focusedWorklogId=584595&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-584595
]
ASF GitHub Bot logged work on GOBBLIN-1429:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 17/Apr/21 06:37
Start Date: 17/Apr/21 06:37
Worklog Time Spent: 10m
Work Description: treff7es commented on a change in pull request #3264:
URL: https://github.com/apache/gobblin/pull/3264#discussion_r615216309
##########
File path:
gobblin-utility/src/main/java/org/apache/gobblin/util/TrustManagerSecureSocketFactory.java
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.gobblin.util;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+
+
+public class TrustManagerSecureSocketFactory extends SSLSocketFactory {
+ private static final org.slf4j.Logger LOG =
LoggerFactory.getLogger(TrustManagerSecureSocketFactory.class);
+
+ private SSLSocketFactory sslSocketFactory;
+ private String[] ciphers;
+ private String protocol;
+
+ public TrustManagerSecureSocketFactory() {
+ this(null, null);
+ }
+
+ public TrustManagerSecureSocketFactory(String[] ciphers, String protocol) {
+ try {
+ SSLContext ctx = SSLContext.getInstance("TLS");
+ sslSocketFactory = ctx.getSocketFactory();
+ ciphers = sslSocketFactory.getSupportedCipherSuites();
+ protocol = ctx.getProtocol();
+ } catch (NoSuchAlgorithmException e) {
Review comment:
Is this intentional you silently drop this exception?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 584595)
Time Spent: 40m (was: 0.5h)
> Add secure TrustManager for LDAP Utils
> --------------------------------------
>
> Key: GOBBLIN-1429
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1429
> Project: Apache Gobblin
> Issue Type: Task
> Reporter: Abhishek Tiwari
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)