Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55A1B10A34 for ; Thu, 27 Aug 2015 13:01:13 +0000 (UTC) Received: (qmail 59474 invoked by uid 500); 27 Aug 2015 13:01:13 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 59442 invoked by uid 500); 27 Aug 2015 13:01:13 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 59431 invoked by uid 99); 27 Aug 2015 13:01:12 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2015 13:01:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6194E1822B4 for ; Thu, 27 Aug 2015 13:01:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.003 X-Spam-Level: **** X-Spam-Status: No, score=4.003 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, NORMAL_HTTP_TO_IP=0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BaruZDmWYbfz for ; Thu, 27 Aug 2015 13:00:58 +0000 (UTC) Received: from mail.common.de (mail.common.de [109.75.181.108]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 401D542921 for ; Thu, 27 Aug 2015 13:00:58 +0000 (UTC) X-Footer: d2VsY2hsaW4uZGU= Received: from [10.219.230.99] ([80.187.101.170]) (authenticated user andreas@welchlin.de) by mail.common.de (Kerio Connect 7.4.2) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for users@qpid.apache.org; Thu, 27 Aug 2015 15:00:37 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <55DEDD4E.6080605@redhat.com> References: <55DDB3AA.8000102@welchlin.de> <55DEDD4E.6080605@redhat.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----9NCJNTI0J5GOWWWTAUL1AMBNEGI9FQ" Content-Transfer-Encoding: 8bit Subject: Re: C++ messaging API: SASL mechanism not set correctly From: andreas@welchlin.de Date: Thu, 27 Aug 2015 15:00:45 +0200 To: users@qpid.apache.org Message-ID: <350A5CA6-AC6E-4746-8C3B-7F555ACF4A5A@welchlin.de> ------9NCJNTI0J5GOWWWTAUL1AMBNEGI9FQ Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 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 : >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:"); >> mConnection->setOption(QPID_OPTION_SASL_MECHANISMS, "EXTERNAL"); >> mConnection->setOption(QPID_OPTION_TRANSPORT, "ssl"); >> mConnection->open(); >> >> >> The logfile says: >> >> Starting connection, urls=[amqp:ssl:] >> Trying to connect to amqp:ssl:... >> Created IO thread: 0 >> SslConnector created for 0-10 >> Connecting: 90.162.253.101:10170 >> RECV [[172.17.97.139:46893-]]: 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: users-unsubscribe@qpid.apache.org >For additional commands, e-mail: users-help@qpid.apache.org ------9NCJNTI0J5GOWWWTAUL1AMBNEGI9FQ--