Skip to content

Commit a30cb11

Browse files
committed
squash w/ 2870ae7. remove TLS/JKS options
1 parent e53b1eb commit a30cb11

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

irods/src/main/java/ch/cyberduck/core/irods/IRODSConnectionUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import ch.cyberduck.core.preferences.HostPreferencesFactory;
1919
import ch.cyberduck.core.preferences.PreferencesReader;
2020

21+
import ch.cyberduck.core.ssl.X509TrustManager;
22+
2123
import org.apache.commons.lang3.StringUtils;
2224
import org.apache.logging.log4j.LogManager;
2325
import org.apache.logging.log4j.Logger;
@@ -30,6 +32,7 @@
3032
import org.irods.irods4j.low_level.api.IRODSApi;
3133
import org.irods.irods4j.low_level.api.IRODSException;
3234

35+
import javax.net.ssl.TrustManager;
3336
import java.io.IOException;
3437

3538
final class IRODSConnectionUtils {
@@ -63,11 +66,8 @@ public static IRODSApi.ConnectionOptions initConnectionOptions(IRODSSession sess
6366
final IRODSApi.ConnectionOptions options = new IRODSApi.ConnectionOptions();
6467

6568
options.clientServerNegotiation = preferences.getProperty(IRODSProtocol.CLIENT_SERVER_NEGOTIATION);
66-
options.sslProtocol = preferences.getProperty(IRODSProtocol.TLS_PROTOCOL);
67-
options.sslTruststore = preferences.getProperty(IRODSProtocol.TLS_TRUSTSTORE);
68-
options.sslTruststorePassword = preferences.getProperty(IRODSProtocol.TLS_TRUSTSTORE_PASSWORD);
69-
log.debug("client server negotiation = [{}], ssl protocol = [{}], ssl truststore = [{}]",
70-
options.clientServerNegotiation, options.sslProtocol, options.sslTruststore);
69+
options.trustManagers = new TrustManager[]{session.getFeature(X509TrustManager.class)};
70+
log.debug("client server negotiation = [{}], ssl protocol = [{}]", options.clientServerNegotiation, options.sslProtocol);
7171

7272
options.encryptionAlgorithm = preferences.getProperty(IRODSProtocol.ENCRYPTION_ALGORITHM);
7373
options.encryptionKeySize = preferences.getInteger(IRODSProtocol.ENCRYPTION_KEY_SIZE);

irods/src/main/java/ch/cyberduck/core/irods/IRODSProtocol.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ public final class IRODSProtocol extends AbstractProtocol {
3333
public static final String DESTINATION_RESOURCE = "Destination Resource";
3434
public static final String DELETE_OBJECTS_PERMANTENTLY = "Delete Objects Permanently";
3535
public static final String CLIENT_SERVER_NEGOTIATION = "Client Server Negotiation";
36-
public static final String TLS_PROTOCOL = "TLS Protocol";
37-
public static final String TLS_TRUSTSTORE = "TLS Truststore";
38-
public static final String TLS_TRUSTSTORE_PASSWORD = "TLS Truststore Password";
3936
public static final String ENCRYPTION_ALGORITHM = "Encryption Algorithm";
4037
public static final String ENCRYPTION_KEY_SIZE = "Encryption Key Size";
4138
public static final String ENCRYPTION_SALT_SIZE = "Encryption Salt Size";
@@ -89,9 +86,6 @@ public Map<String, String> getProperties() {
8986
final Map<String, String> props = new HashMap<>();
9087
props.put(DELETE_OBJECTS_PERMANTENTLY, "no");
9188
props.put(CLIENT_SERVER_NEGOTIATION, "CS_NEG_REFUSE");
92-
props.put(TLS_PROTOCOL, "TLSv1.2");
93-
props.put(TLS_TRUSTSTORE, "NOT SET");
94-
props.put(TLS_TRUSTSTORE_PASSWORD, "NOT SET");
9589
props.put(ENCRYPTION_ALGORITHM, "AES-256-CBC");
9690
props.put(ENCRYPTION_KEY_SIZE, "32");
9791
props.put(ENCRYPTION_SALT_SIZE, "8");

0 commit comments

Comments
 (0)