SSL\TLS usage
#474
-
Hi, how i can use a TLS? |
Beta Was this translation helpful? Give feedback.
Answered by
Havret
Jan 2, 2024
Replies: 1 comment 6 replies
-
Hi @nazar4k, Here's a quick guide to setting up SSL/TLS in ArtemisNetClient: First, create an endpoint with SSL/TLS enabled by setting the scheme to Scheme.Amqps: var endpoint = Endpoint.Create("localhost", 5672, "guest", "guest", scheme: Scheme.Amqps); Next, configure your ConnectionFactory with these SSL settings (feel free to adjust them as needed): var connectionFactory = new ConnectionFactory
{
SSL =
{
ClientCertificates = null,
Protocols = SslProtocols.Tls13,
CheckCertificateRevocation = false,
RemoteCertificateValidationCallback = null,
LocalCertificateSelectionCallback = null
}
}; This sets up the SSL properties of the connection factory, including protocols and certificate settings. Finally, create a connection and a producer to send messages: var connection = await connectionFactory.CreateAsync(endpoint);
var producer = await connection.CreateProducerAsync("my-address", RoutingType.Multicast);
await producer.SendAsync(new Message("foo")); I hope that helps, |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
nazar4k
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @nazar4k,
Here's a quick guide to setting up SSL/TLS in ArtemisNetClient:
First, create an endpoint with SSL/TLS enabled by setting the scheme to Scheme.Amqps:
Next, configure your ConnectionFactory with these SSL settings (feel free to adjust them as needed):
This sets up the SSL properties of the connection…