2

I am developing a application in C++ using Qpid C++ Messaging API. The application should send messages to another .net application running amqpnetlite.

However, when initiating the connection, on the C++ side, I got this security error:

[Security] error Expected SASL frame; got type \0x00 
[Security] error Unexpected descriptor in SASL negotiation: unknown-descriptor (0x10).

I was wondering anyone has any thoughts about the error?

Additional Info:

  1. I confirm that the C++ application speaks AMQP 1.0.
  2. I also have this python script (using Qpid Proton 0.10) that speaks AMQP 1.0 and sends essentially the same message to the .net application. This python script works just fine.
  3. I set up a C++ AMQP broker with qpidd --auth no. Now both the python script and the C++ application (connection configured with {sasl_mechanism:ANONYMOUS}) could send messages through.

Any or all help would be appreciated!


EDIT

Find the solution myself.

When initiate the connection on the C++ application side, the SASL_MECHANISMS must be set to NONE explicitly, as amqpnetlite defaults to disable any authentication (not even the ANONYMOUS mode) when listening for incoming connection.

This can be done in the C++ code by doing

connection.setOption("sasl_mechanisms","NONE");

or by supplying the option from the command line.

./send.o localhost {protocol:amqp1.0\,sasl_mechanisms:NONE}

The NONE option for sasl_mechanisms is documented nowhere in the Qpid C++ API documentation. It has to be found out by looking into the source code.

AaronT
  • 21
  • 3

0 Answers0