|
18 | 18 | import ch.cyberduck.core.preferences.HostPreferencesFactory; |
19 | 19 | import ch.cyberduck.core.preferences.PreferencesReader; |
20 | 20 |
|
| 21 | +import ch.cyberduck.core.ssl.X509TrustManager; |
| 22 | + |
21 | 23 | import org.apache.commons.lang3.StringUtils; |
22 | 24 | import org.apache.logging.log4j.LogManager; |
23 | 25 | import org.apache.logging.log4j.Logger; |
|
30 | 32 | import org.irods.irods4j.low_level.api.IRODSApi; |
31 | 33 | import org.irods.irods4j.low_level.api.IRODSException; |
32 | 34 |
|
| 35 | +import javax.net.ssl.TrustManager; |
33 | 36 | import java.io.IOException; |
34 | 37 |
|
35 | 38 | final class IRODSConnectionUtils { |
@@ -63,11 +66,8 @@ public static IRODSApi.ConnectionOptions initConnectionOptions(IRODSSession sess |
63 | 66 | final IRODSApi.ConnectionOptions options = new IRODSApi.ConnectionOptions(); |
64 | 67 |
|
65 | 68 | 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); |
71 | 71 |
|
72 | 72 | options.encryptionAlgorithm = preferences.getProperty(IRODSProtocol.ENCRYPTION_ALGORITHM); |
73 | 73 | options.encryptionKeySize = preferences.getInteger(IRODSProtocol.ENCRYPTION_KEY_SIZE); |
|
0 commit comments