|
21 | 21 | import io.vertx.core.impl.future.PromiseInternal; |
22 | 22 | import io.vertx.core.net.ClientSSLOptions; |
23 | 23 | import io.vertx.core.net.HostAndPort; |
24 | | -import io.vertx.core.net.impl.NetSocketInternal; |
25 | | -import io.vertx.core.net.impl.SSLHelper; |
26 | | -import io.vertx.core.net.impl.SslChannelProvider; |
27 | | -import io.vertx.core.net.impl.SslHandshakeCompletionHandler; |
| 24 | +import io.vertx.core.net.impl.*; |
28 | 25 | import io.vertx.core.spi.metrics.ClientMetrics; |
29 | 26 | import io.vertx.mssqlclient.MSSQLConnectOptions; |
30 | 27 | import io.vertx.mssqlclient.MSSQLInfo; |
@@ -108,15 +105,15 @@ Future<Void> enableSsl(boolean clientConfigSsl, byte encryptionLevel, MSSQLConne |
108 | 105 |
|
109 | 106 | // Do not perform hostname validation if the client did not require encryption |
110 | 107 | if (!clientConfigSsl) { |
111 | | - sslOptions.setTrustAll(true); |
| 108 | + sslOptions.setTrustOptions(TrustAllOptions.INSTANCE); |
112 | 109 | } |
113 | 110 | sslOptions.setHostnameVerificationAlgorithm(""); |
114 | 111 |
|
115 | 112 | // 2. Create and set up an SSLHelper and SSLHandler |
116 | 113 | // options.getApplicationLayerProtocols() |
117 | 114 | Future<SslChannelProvider> f = sslHelper.resolveSslChannelProvider(sslOptions, "", false, null, null, context); |
118 | 115 | return f.compose(provider -> { |
119 | | - SslHandler sslHandler = provider.createClientSslHandler(socket.remoteAddress(), null, sslOptions.isUseAlpn(), sslOptions.isTrustAll(), sslOptions.getSslHandshakeTimeout(), sslOptions.getSslHandshakeTimeoutUnit()); |
| 116 | + SslHandler sslHandler = provider.createClientSslHandler(socket.remoteAddress(), null, sslOptions.isUseAlpn(), sslOptions.getSslHandshakeTimeout(), sslOptions.getSslHandshakeTimeoutUnit()); |
120 | 117 |
|
121 | 118 | // 3. TdsSslHandshakeCodec manages SSL payload encapsulated in TDS packets |
122 | 119 | TdsSslHandshakeCodec tdsSslHandshakeCodec = new TdsSslHandshakeCodec(); |
|
0 commit comments