Description of problem: When the C++ client using AMQP 1.0 protocol tries to authenticate over DIGEST-MD5 mechanism to a broker, the client fails with error message: ./spout --broker guest/guest.brq.redhat.com:5672 --connection-options "{protocol: 'amqp1.0', sasl-mechanisms:DIGEST-MD5}" amq.direct 2013-11-29 08:50:41 [Security] error Expected SASL frame; got type \x12 2013-11-29 08:50:41 [System] error Caught exception in state: 3 with event: 1: Out of Bounds (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/amqp/Decoder.cpp:303) Segmentation fault (core dumped) The broker authenticated the client well, see the terminal transcript (part of broker's log "qpidd.log"), please: info Set TCP_NODELAY on connection to 10.34.33.252:41655 2013-11-29 08:50:42 [Broker] info Using AMQP 1.0 (with SASL layer) 2013-11-29 08:50:42 [Security] info SASL: Mechanism list: DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5 2013-11-29 08:50:42 [Security] info SASL: Starting authentication with mechanism: DIGEST-MD5 2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Challenge issued 2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Challenge issued 2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Security layer installed 2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Authenticated as guest@QPID Note: The C++ client using AMQP 0-10 protocol works well. The issue occurs also at Perl client using AMQP 1.0 protocol and DIGEST-MD5 mechanism. Version-Release number of selected component (if applicable): qpid-java-common-0.23-4.el6.noarch qpid-cpp-client-devel-0.22-29.el6.i686 rh-qpid-cpp-tests-0.22-29.el6.i686 qpid-java-amqp-0-10-client-jms-0.23-4.el6.noarch qpid-qmf-0.22-24.el6.i686 qpid-cpp-server-rdma-0.22-29.el6.i686 qpid-java-example-0.23-4.el6.noarch qpid-snmpd-1.0.0-14.el6.i686 qpid-cpp-client-0.22-29.el6.i686 python-qpid-qmf-0.22-24.el6.i686 qpid-cpp-server-devel-0.22-29.el6.i686 ruby-qpid-qmf-0.22-24.el6.i686 qpid-cpp-server-xml-0.22-29.el6.i686 qpid-java-client-0.23-4.el6.noarch qpid-jca-0.22-1.el6.noarch qpid-proton-c-devel-0.5-9.el6.i686 qpid-cpp-client-devel-docs-0.22-29.el6.noarch qpid-cpp-client-rdma-0.22-29.el6.i686 qpid-cpp-debuginfo-0.22-16.el6.i686 qpid-tools-0.22-7.el6.noarch qpid-cpp-server-store-0.22-29.el6.i686 perl-qpid-0.22-7.el6.i686 qpid-jca-xarecovery-0.22-1.el6.noarch qpid-proton-c-0.5-9.el6.i686 qpid-cpp-server-0.22-29.el6.i686 qpid-cpp-server-ssl-0.22-29.el6.i686 python-qpid-0.22-8.el6.noarch qpid-cpp-client-ssl-0.22-29.el6.i686 qpid-cpp-server-ha-0.22-29.el6.i686 How reproducible: 100% Steps to Reproduce: 1. Run a qpid broker. 2. Create a user in the qpidd.sasldb database (in this case "guest" with password "guest"). 3. Try to send a message using AMQP 1.0 protocol and authentication mechanism DIGEST-MD5. ./spout --broker guest/guest.brq.redhat.com:5672 --connection-options "{protocol: 'amqp1.0', sasl-mechanisms:DIGEST-MD5}" amq.direct Actual results: Client fails without delivering a message. Expected results: Client should connect the broker and deliver the message. Additional info: Broker configuration: # cat /etc/qpid/qpidd.conf log-to-file=/var/lib/qpidd/qpidd.log auth=yes log-enable=info+ port=5672
Fixed upstream: https://svn.apache.org/r1546628
Also need: https://svn.apache.org/r1546952 to prevent link failure on windows
*** Bug 1037791 has been marked as a duplicate of this bug. ***
C++ and Perl clients using AMQP 1.0 or AMQP 0-10 protocol are able to authenticate over DIGEST-MD5 mechanism to a broker and the authentication works as expected for the both protocols. Verified on packages qpid-cpp-0.22-31 and perl-qpid-0.22-7 on Rhel6.5 i386 and x86_64. --> VERIFIED