alanxz / SimpleAmqpClient

Simple C++ Interface to rabbitmq-c
MIT License
397 stars 213 forks source link

Optionally set ca cert path #309

Closed p487morgan closed 2 years ago

p487morgan commented 2 years ago

Hi @alanxz. Thanks for all the good work.

This PR should resolve:

There are all requiring the same thing - to optionally skip the call to the c library amqp_ssl_socket_set_cacert

I've tested it locally with no problems.

Kind regards, Paul

prateek9623 commented 2 years ago

@alanxz @p487morgan Hi, I tried connecting to AmazonMQ with these changes, but I still get this error Error setting client certificate for socket: SSL peer cert verification failed. I had to set:

    tlsParam.verify_hostname = false;
    tlsParam.verify_peer     = false;

to make it work. In my PR https://github.com/alanxz/SimpleAmqpClient/pull/295 also had to do this. Is there a better way to resolve this?

p487morgan commented 2 years ago

Hi @prateek9623 Just to clarify, I also set those flags to false in my client code