7

Trying to get RabbitMQ wired up to play nice with TLS v1.2. Working with both a Java client and a .NET Core client. The Java client is working but the .NET one is pushing back. Here are my factory settings:

var factory = new ConnectionFactory
{
   HostName = hostName,
   VirtualHost = vHost,
   UserName = username,
   Password = password,
   Port = 5671,
   Ssl = {Enabled = true}
};

I’m getting this exception: System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL. ---> Interop+Crypto+OpenSslCryptographicException: error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version

Looking at the very tail end of the exception message it appears that the TLS version might be old but I have the latest version of RabbitMQ installed – 4.1.1

Dug into the RabbitMQ source for the ConnectionFactory class but cannot find anything relating to setting the TLS version. In my Java app it works thusly: factory.useSslProtocol("TLSv1.2");

Saw in another SO thread that an old version of Erlang might be the cause but I have the latest version (8.1) installed.

Any pointers on where to look next?

UPDATE: Foound the way to set the TLS property: factory.Ssl.Version = SslProtocols.Tls12;

But now I'm getting a System.Security.Authentication.AuthenticationException: The remote certificate is invalid exception.

1
  • Can you share your configuration file? Also, do you have the certificate for the Certificate Authority in the Trusted Root Certification folder of CertMgr Commented Dec 13, 2016 at 12:43

1 Answer 1

5

this worked for me:

Ssl = new SslOption
{
    Version = SslProtocols.Tls12,
    Enabled = true,
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.