5858 * <li><code>queryTimeout</code> - timeout used to calculate a default gRPC deadline when querying InfluxDB.
5959 * Can be <code>null</code>, in which case queries can potentially run forever.</li>
6060 * <li><code>allowHttpRedirects</code> - allow redirects for InfluxDB connections</li>
61- * <li><code>disableServerCertificateValidation</code> -
62- * disable server certificate validation for HTTPS connections
63- * </li>
6461 * <li><code>headers</code> - headers to be added to requests</li>
65- * <li><code>sslRootsFilePath</code> - path to the stored certificates file in PEM format</li>
6662 * <li><code>disableGRPCCompression</code> - disables the default gRPC compression header</li>
6763 * </ul>
6864 * <p>
@@ -104,9 +100,7 @@ public final class ClientConfig {
104100 private final Duration writeTimeout ;
105101 private final Duration queryTimeout ;
106102 private final Boolean allowHttpRedirects ;
107- private final Boolean disableServerCertificateValidation ;
108103 private final Map <String , String > headers ;
109- private final String sslRootsFilePath ;
110104 private final boolean disableGRPCCompression ;
111105 private final NettyHttpClientConfig nettyHttpClientConfig ;
112106
@@ -247,27 +241,6 @@ public Boolean getAllowHttpRedirects() {
247241 return allowHttpRedirects ;
248242 }
249243
250- /**
251- * Gets the disable server SSL certificate validation. Default to 'false'.
252- *
253- * @return the disable server SSL certificate validation
254- */
255- @ Nonnull
256- public Boolean getDisableServerCertificateValidation () {
257- return disableServerCertificateValidation ;
258- }
259-
260- /**
261- * Gets certificates file path.
262- *
263- * @return the certificates file path, may be null
264- */
265- @ Nullable
266- public String sslRootsFilePath () {
267- return sslRootsFilePath ;
268- }
269-
270-
271244 /**
272245 * Gets custom headers for requests.
273246 *
@@ -323,18 +296,16 @@ public boolean equals(final Object o) {
323296 && Objects .equals (writeTimeout , that .writeTimeout )
324297 && Objects .equals (queryTimeout , that .queryTimeout )
325298 && Objects .equals (allowHttpRedirects , that .allowHttpRedirects )
326- && Objects .equals (disableServerCertificateValidation , that .disableServerCertificateValidation )
327299 && Objects .equals (headers , that .headers )
328- && Objects .equals (sslRootsFilePath , that .sslRootsFilePath )
329300 && disableGRPCCompression == that .disableGRPCCompression ;
330301 }
331302
332303 @ Override
333304 public int hashCode () {
334305 return Objects .hash (host , Arrays .hashCode (token ), authScheme , organization ,
335306 database , writePrecision , gzipThreshold , writeNoSync ,
336- timeout , writeTimeout , queryTimeout , allowHttpRedirects , disableServerCertificateValidation ,
337- headers , defaultTags , sslRootsFilePath , disableGRPCCompression );
307+ timeout , writeTimeout , queryTimeout , allowHttpRedirects ,
308+ headers , defaultTags , disableGRPCCompression );
338309 }
339310
340311 @ Override
@@ -350,10 +321,8 @@ public String toString() {
350321 .add ("writeTimeout=" + writeTimeout )
351322 .add ("queryTimeout=" + queryTimeout )
352323 .add ("allowHttpRedirects=" + allowHttpRedirects )
353- .add ("disableServerCertificateValidation=" + disableServerCertificateValidation )
354324 .add ("headers=" + headers )
355325 .add ("defaultTags=" + defaultTags )
356- .add ("sslRootsFilePath=" + sslRootsFilePath )
357326 .add ("disableGRPCCompression=" + disableGRPCCompression )
358327 .toString ();
359328 }
@@ -378,9 +347,7 @@ public static final class Builder {
378347 private Duration writeTimeout ;
379348 private Duration queryTimeout ;
380349 private Boolean allowHttpRedirects ;
381- private Boolean disableServerCertificateValidation ;
382350 private Map <String , String > headers ;
383- private String sslRootsFilePath ;
384351 private boolean disableGRPCCompression ;
385352 private NettyHttpClientConfig nettyHttpClientConfig ;
386353
@@ -566,19 +533,6 @@ public Builder allowHttpRedirects(@Nullable final Boolean allowHttpRedirects) {
566533 return this ;
567534 }
568535
569- /**
570- * Sets the disable server SSL certificate validation. Default to 'false'.
571- *
572- * @param disableServerCertificateValidation Disable server SSL certificate validation. Default to 'false'.
573- * @return this
574- */
575- @ Nonnull
576- public Builder disableServerCertificateValidation (@ Nullable final Boolean disableServerCertificateValidation ) {
577-
578- this .disableServerCertificateValidation = disableServerCertificateValidation ;
579- return this ;
580- }
581-
582536 /**
583537 * Sets the custom headers that will be added to requests. This is useful for adding custom headers to requests,
584538 * such as tracing headers. To add custom headers use following code:
@@ -611,19 +565,6 @@ public Builder headers(@Nullable final Map<String, String> headers) {
611565 return this ;
612566 }
613567
614- /**
615- * Sets certificate file path. Default is 'null'.
616- *
617- * @param sslRootsFilePath The certificate file path
618- * @return this
619- */
620- @ Nonnull
621- public Builder sslRootsFilePath (@ Nullable final String sslRootsFilePath ) {
622-
623- this .sslRootsFilePath = sslRootsFilePath ;
624- return this ;
625- }
626-
627568 /**
628569 * Sets whether to disable gRPC compression. Default is 'false'.
629570 *
@@ -808,10 +749,7 @@ private ClientConfig(@Nonnull final Builder builder) {
808749 ? builder .timeout : Duration .ofSeconds (WriteOptions .DEFAULT_WRITE_TIMEOUT );
809750 queryTimeout = builder .queryTimeout ;
810751 allowHttpRedirects = builder .allowHttpRedirects != null ? builder .allowHttpRedirects : false ;
811- disableServerCertificateValidation = builder .disableServerCertificateValidation != null
812- ? builder .disableServerCertificateValidation : false ;
813752 headers = builder .headers ;
814- sslRootsFilePath = builder .sslRootsFilePath ;
815753 disableGRPCCompression = builder .disableGRPCCompression ;
816754 nettyHttpClientConfig = builder .nettyHttpClientConfig ;
817755 }
0 commit comments