Hi,
I am trying to make a simple TLS/SSL connection with .NET client. The code is identical to the example here: https://www.rabbitmq.com/ssl.html#dotnet-example. The path to client key and password is of course adjusted. (full code in Program.cs)
The code triggered an exception: (full text in exception.txt)
AggregateException: One or more errors occurred. (System cannot find the specified file.)
Inner Exception 2: WindowsCryptographicException: System cannot find the specified file
The troubleshooting process is followed by this guide: https://www.rabbitmq.com/troubleshooting-ssl.html#openssl-tools
It is possible to use OpenSSL to confirm there is a TLS connection between server and client by using:
openssl s_server -accept 8443 -cert server_certificate.pem -key server_key.pem -CAfile ca_certificate.pem
openssl s_client -connect localhost:8443 -cert client_certificate.pem -key client_key.pem -CAfile ca_certificate.pem -verify 8 -verify_hostname DE-WS691906
RabbitMQ awares of TLS connection.
openssl s_client -connect localhost:5671 -cert client_certificate.pem -key client_key.pem -CAfile ca_certificate.pem
The output from log file:
2020-06-02 17:27:43.927 [info] <0.1242.0> accepting AMQP connection <0.1242.0> ([::1]:54483 -> [::1]:5671)
2020-06-02 17:27:43.927 [error] <0.1242.0> closing AMQP connection <0.1242.0> ([::1]:54483 -> [::1]:5671):{handshake_timeout,handshake}
I could not find the root of problem. I really can't.
Other infos:
Strongly suggest that the issue is in the .NET application:
either the above path does not exist or it does not contain a certificate and private key in the PKCS#12 format.
Server logs further confirm this: the client did connect but then closed TCP connection abruptly, likely because the process
ran into the exception and had to terminate.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/rabbitmq-users/16711523-6014-4887-b2aa-b5b1a4c926ed%40googlegroups.com.
Searching [1] for “unknown CA” yields [2]. I highly recommend investing some time and learning about how TLS really works
instead of trying to copy-and-paste some examples. The best part is that once you understand how it works, you will be able
to use it confidently with other tools, not just RabbitMQ.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/rabbitmq-users/8e07581b-f506-490f-aaf7-785f52763b6b%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.
AuthenticationException: The remote certificate is invalid according to the validation procedure