0

I'm trying to connect using SSL, SSL is enabled on the server but I'm not able to connect using the rabbitmq-c client.

I took the amqps_connect_timeout.c example and this is the error that I'm getting at amqp_socket_open_noblock.

SSL peer cert verification failed

When using OpenSSL the connection and verification succeed.

openssl verify -CAfile cacert.pem cert.pem
cert.pem: OK

openssl s_client -connect www.example.com:25586 -CAfile cacert.pem
Verify return code: 0 (ok)

If I disable certificate verification the connection succeed.

amqp_ssl_socket_set_verify_peer(socket, 0);

What am I doing wrong?

Amir Rossert
  • 226
  • 2
  • 15

1 Answers1

0

I have found what was wrong, my CAfile was missing the intermediate certificate. Probably openssl s_client is ignoring this by default.

After fixing the cacert file the connection was established from the rabbitmq-c library.

Amir Rossert
  • 226
  • 2
  • 15