Closed LukeRH closed 2 years ago
Which .net runtime, .net framework, .net core or something else?
By default the library uses SslProtocols.Default which depends on the framework and version you use. To enforce TLS12, create a ConnectionFactory
object and set ConnectionFactory.SSL.Protocols = SslProtocols.Tls12
, and then use it to create a connection.
We are using .Net Framework 4.8
Have you tried using SSL settings on ConnectionFactory? Does it work?
@xinchen10 Apologies for not replying sooner. Using the connection factory as suggested worked. ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.SSL.Protocols = System.Security.Authentication.SslProtocols.Tls12;
Thanks for your help Luke
Hi, We are seeing the following exception message "Amqp.AmqpException: Invalid TLS version Azure Service Bus" when sending messages to a new Azure Service Bus with TLS 1.2 enforced as default. It looks like AMQPNetLite attempts to connect using TLS 1.0. Does AMQPNetLite support TLS 1.2?
To reproduce create a new AZ service bus with a topic and sub then run the Azure Service Bus topic example provided in the repo.
The workaround is to configure AZ service bus to accept connections using<TLS 1.2 as described here https://docs.microsoft.com/en-gb/azure/service-bus-messaging/transport-layer-security-enforce-minimum-version?WT.mc_id=Portal-Microsoft_Azure_ServiceBus but its not an ideal solution.
Thanks Luke