Skip to content

Commit fe39d6e

Browse files
committed
Let operating system choose which TLS version to use
This is the recommendation according to the official docs: https://docs.microsoft.com/en-us/dotnet/api/system.security.authentication.sslprotocols?view=netcore-2.2
1 parent 9b239f0 commit fe39d6e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

projects/client/RabbitMQ.Client/src/client/api/ConnectionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public sealed class ConnectionFactory : ConnectionFactoryBase, IAsyncConnectionF
137137
/// TLS versions enabled by default: TLSv1.2, v1.1, v1.0.
138138
/// </summary>
139139
public static SslProtocols DefaultAmqpUriSslProtocols { get; set; } =
140-
SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;
140+
SslProtocols.None;
141141

142142
/// <summary>
143143
/// The AMQP URI SSL protocols.

projects/client/RabbitMQ.Client/src/client/api/SslOption.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class SslOption
5757
/// </summary>
5858
public SslOption(string serverName, string certificatePath = "", bool enabled = false)
5959
{
60-
Version = SslProtocols.Tls;
60+
Version = SslProtocols.None;
6161
AcceptablePolicyErrors = SslPolicyErrors.None;
6262
ServerName = serverName;
6363
CertPath = certificatePath;

projects/client/Unit/src/unit/TestSsl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void TestNoClientCertificate()
145145
Enabled = true,
146146
};
147147

148-
cf.Ssl.Version = SslProtocols.Tls;
148+
cf.Ssl.Version = SslProtocols.None;
149149
cf.Ssl.AcceptablePolicyErrors = SslPolicyErrors.RemoteCertificateNotAvailable |
150150
SslPolicyErrors.RemoteCertificateNameMismatch;
151151

0 commit comments

Comments
 (0)