Hi Gordon, thank you for your answer. I am using gcc 4.4.7 on a CentOs system.
Regards, Andreas Am 27. August 2015 11:50:06 MESZ, schrieb Gordon Sim <[email protected]>: >On 08/26/2015 01:40 PM, Andreas Welchlin wrote: >> Hello, >> >> I tried to connect to a AMQP Broker via SSL using AMQP 0.10. >> >> I used C++ and the Qpid Messaging API version 0.28. >> >> It seems like I set the SASL mechanism in a wrong way. >> >> I tried the following: >> >> const char* QPID_OPTION_TRANSPORT = "transport"; >> const char* QPID_OPTION_SASL_MECHANISMS = "sasl_mechanisms"; >> >> mConnection = new Connection("amqp:ssl:<ipaddress>"); >> mConnection->setOption(QPID_OPTION_SASL_MECHANISMS, "EXTERNAL"); >> mConnection->setOption(QPID_OPTION_TRANSPORT, "ssl"); >> mConnection->open(); >> >> >> The logfile says: >> >> Starting connection, urls=[amqp:ssl:<ipaddress>] >> Trying to connect to amqp:ssl:<ipaddress>... >> Created IO thread: 0 >> SslConnector created for 0-10 >> Connecting: 90.162.253.101:10170 >> RECV [[172.17.97.139:46893-<ipaddress>]]: INIT(0-10) >> Exception constructed: Desired mechanism(s) not valid: True >(supported: >> EXTERNAL) (qpid/client/ConnectionHandler.cpp:260) > >The problem here seems to be that the desired mechanism is somehow >being >treated as a boolean, which is converted to "True" when converting to a > >string. > >I can't seem to reproduce this using the code you have above, even >against 0.28. What compiler are you using? > >(One unrelated point is that you don't need to use new and explicitly >have a pointer to the connection. The Connection class is a handle that > >allows you to pass it around and internally it maintains the necessary >reference counting). > >> Closing connection due to Desired mechanism(s) not valid: True >> (supported: EXTERNAL) (qpid/client/ConnectionHandler.cpp:260) >> Exception constructed: Desired mechanism(s) not valid: True >(supported: >> EXTERNAL) (qpid/client/ConnectionHandler.cpp:260) >> Exception constructed: Desired mechanism(s) not valid: True >(supported: >> EXTERNAL) (qpid/client/ConnectionHandler.cpp:260) >> >> >> What am I doing wrong? Would it help if I set the SASL mechanism like >this: >> >> mConnection = new Connection(brokerUrl, >> "{transport:ssl,sasl-mechanism:EXTERNAL}"); > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected]
