0

I am trying to get the sender example from the azure-service-bus-sample working on Linux based system (https://github.com/genieplus/azure-service-bus-samples/blob/master/proton-c-queues-and-topics/sender.c). However, when I try to execute it, it always fails with the following traces:

Sending messages to amqps://testRule:***@MY_DOMAIN/ServiceBusDefaultNamespace/q1
CALL pn_messenger_set_outgoing_window... RETURNED 0
CALL pn_messenger_set_blocking... RETURNED 0
CALL pn_messenger_start... RETURNED 0
CALL pn_messenger_put... RETURNED 0
CALL pn_messenger_send... recv: Connection reset by peer
[0x1449a80]:ERROR amqp:connection:framing-error SSL Failure: Unknown error.
CONNECTION ERROR connection aborted (remote)
RETURNED 0

I tried to add the auto generated certificate as a trusted certificate via

pn_messenger_set_trusted_certificates (messenger, "/ca/trusted/);

I got a different error message:

Sent BytesMessage with id
c99a2261-843e-4ebf-846c8fe799e8fc0b
Message status PN_STATUS_ABORTED
Final send status is: failed, never sent on network
CALL pn_messenger_settle... RETURNED 0
CALL pn_messenger_put... RETURNED 0
CALL pn_messenger_send... [0x18aaad0]:ERROR amqp:connection:framing-error SSL Failure: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
RETURNED 0

Any idea how to fix this?

Bechir
  • 987
  • 10
  • 26

1 Answers1

0

You have to download the server certificate and copy to the path mentioned in the code. In linux you have to run c_rehash command to create hashing.

Ref link: https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_load_verify_locations.html

Yuvan Raj
  • 1
  • 2