@@ -178,6 +178,7 @@ public abstract class ConnectionConfiguration<T> : IConnectionConfigurationValue
178
178
public static IMemoryStreamFactory DefaultMemoryStreamFactory { get ; } = Elasticsearch . Net . MemoryStreamFactory . Default ;
179
179
private bool _enableThreadPoolStats ;
180
180
private bool _enableApiVersioningHeader ;
181
+ private bool _unsafeDisableTls13 ;
181
182
182
183
private string _userAgent = ConnectionConfiguration . DefaultUserAgent ;
183
184
private readonly Func < HttpMethod , int , bool > _statusCodeToResponseSuccess ;
@@ -239,7 +240,6 @@ false when int.TryParse(apiVersioningEnabled, out var isEnabledValue) => isEnabl
239
240
int ? IConnectionConfigurationValues . MaxRetries => _maxRetries ;
240
241
TimeSpan ? IConnectionConfigurationValues . MaxRetryTimeout => _maxRetryTimeout ;
241
242
IMemoryStreamFactory IConnectionConfigurationValues . MemoryStreamFactory => _memoryStreamFactory ;
242
-
243
243
Func < Node , bool > IConnectionConfigurationValues . NodePredicate => _nodePredicate ;
244
244
Action < IApiCallDetails > IConnectionConfigurationValues . OnRequestCompleted => _completedRequestHandler ;
245
245
Action < RequestData > IConnectionConfigurationValues . OnRequestDataCreated => _onRequestDataCreated ;
@@ -252,10 +252,8 @@ false when int.TryParse(apiVersioningEnabled, out var isEnabledValue) => isEnabl
252
252
IElasticsearchSerializer IConnectionConfigurationValues . RequestResponseSerializer => UseThisRequestResponseSerializer ;
253
253
TimeSpan IConnectionConfigurationValues . RequestTimeout => _requestTimeout ;
254
254
TimeSpan IConnectionConfigurationValues . DnsRefreshTimeout => _dnsRefreshTimeout ;
255
-
256
255
Func < object , X509Certificate , X509Chain , SslPolicyErrors , bool > IConnectionConfigurationValues . ServerCertificateValidationCallback =>
257
256
_serverCertificateValidationCallback ;
258
-
259
257
IReadOnlyCollection < int > IConnectionConfigurationValues . SkipDeserializationForStatusCodes => _skipDeserializationForStatusCodes ;
260
258
TimeSpan ? IConnectionConfigurationValues . SniffInformationLifeSpan => _sniffLifeSpan ;
261
259
bool IConnectionConfigurationValues . SniffsOnConnectionFault => _sniffOnConnectionFault ;
@@ -267,9 +265,9 @@ false when int.TryParse(apiVersioningEnabled, out var isEnabledValue) => isEnabl
267
265
bool IConnectionConfigurationValues . TransferEncodingChunked => _transferEncodingChunked ;
268
266
bool IConnectionConfigurationValues . EnableTcpStats => _enableTcpStats ;
269
267
bool IConnectionConfigurationValues . EnableThreadPoolStats => _enableThreadPoolStats ;
270
-
271
268
MetaHeaderProvider IConnectionConfigurationValues . MetaHeaderProvider { get ; } = new MetaHeaderProvider ( ) ;
272
269
bool IConnectionConfigurationValues . EnableApiVersioningHeader => _enableApiVersioningHeader ;
270
+ bool IConnectionConfigurationValues . UnsafeDisableTls13 => _unsafeDisableTls13 ;
273
271
274
272
void IDisposable . Dispose ( ) => DisposeManagedResources ( ) ;
275
273
@@ -620,6 +618,10 @@ public T SkipDeserializationForStatusCodes(params int[] statusCodes) =>
620
618
621
619
public T EnableThreadPoolStats ( bool enableThreadPoolStats = true ) => Assign ( enableThreadPoolStats , ( a , v ) => a . _enableThreadPoolStats = v ) ;
622
620
621
+ /// <inheritdoc cref="IConnectionConfigurationValues.UnsafeDisableTls13"/>
622
+ [ Obsolete ( "This API is temporary, experiemental setting and will be removed in a future minor release." ) ]
623
+ public T UnsafeDisableTls13 ( bool disableTls13 = true ) => Assign ( disableTls13 , ( a , v ) => a . _unsafeDisableTls13 = v ) ;
624
+
623
625
protected virtual void DisposeManagedResources ( )
624
626
{
625
627
_connectionPool ? . Dispose ( ) ;
0 commit comments