You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/03/15 20:46:00 UTC

[1/2] qpid-proton git commit: NO-JIRA: [cpp] add sasl_allow_insecure_mechs to simple_connect.cpp

Repository: qpid-proton
Updated Branches:
  refs/heads/master 04d466f36 -> edf5d5b82


NO-JIRA: [cpp] add sasl_allow_insecure_mechs to simple_connect.cpp


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/eed5f230
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/eed5f230
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/eed5f230

Branch: refs/heads/master
Commit: eed5f23008332a65fbed589e1d9f3876d36e9eae
Parents: 04d466f
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Mar 15 09:43:29 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Mar 15 09:45:05 2018 -0400

----------------------------------------------------------------------
 examples/cpp/CMakeLists.txt     |  1 +
 examples/cpp/simple_connect.cpp | 14 +++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/eed5f230/examples/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
index 1219ed5..dea1101 100644
--- a/examples/cpp/CMakeLists.txt
+++ b/examples/cpp/CMakeLists.txt
@@ -61,6 +61,7 @@ endif()
 foreach(example
     broker
     helloworld
+    simple_connect
     simple_recv
     simple_send
     reconnect_client

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/eed5f230/examples/cpp/simple_connect.cpp
----------------------------------------------------------------------
diff --git a/examples/cpp/simple_connect.cpp b/examples/cpp/simple_connect.cpp
index 499dbd5..0085b3b 100644
--- a/examples/cpp/simple_connect.cpp
+++ b/examples/cpp/simple_connect.cpp
@@ -37,11 +37,12 @@ class simple_connect : public proton::messaging_handler {
     std::string password;
     bool sasl;
     std::string mechs;
+    bool insecure;
     proton::connection connection;
 
   public:
-    simple_connect(const std::string &a, const std::string &u, const std::string &p, bool s, const std::string& ms) :
-        url(a), user(u), password(p), sasl(s), mechs(ms) {}
+    simple_connect(const std::string &a, const std::string &u, const std::string &p, bool s, const std::string& ms, bool in) :
+        url(a), user(u), password(p), sasl(s), mechs(ms), insecure(in) {}
 
     void on_container_start(proton::container &c) OVERRIDE {
         proton::connection_options co;
@@ -49,12 +50,17 @@ class simple_connect : public proton::messaging_handler {
         if (!password.empty()) co.password(password);
         if (sasl) co.sasl_enabled(true);
         if (!mechs.empty()) co.sasl_allowed_mechs(mechs);
+        co.sasl_allow_insecure_mechs(insecure);
         connection = c.connect(url, co);
     }
 
     void on_connection_open(proton::connection &c) OVERRIDE {
         c.close();
     }
+
+    void on_error(const proton::error_condition& e) OVERRIDE {
+        throw std::runtime_error(e.what());
+    }
 };
 
 int main(int argc, char **argv) {
@@ -63,6 +69,7 @@ int main(int argc, char **argv) {
     std::string password;
     std::string mechs;
     bool sasl = false;
+    bool insecure = false;
     example::options opts(argc, argv);
 
     opts.add_value(address, 'a', "address", "connect and send to URL", "URL");
@@ -70,11 +77,12 @@ int main(int argc, char **argv) {
     opts.add_value(password, 'p', "password", "authenticate with PASSWORD", "PASSWORD");
     opts.add_flag(sasl,'s', "sasl", "force SASL authentication with no user specified (Use for Kerberos/GSSAPI)");
     opts.add_value(mechs, 'm', "mechs", "allowed SASL mechanisms", "MECHS");
+    opts.add_flag(insecure, 'i', "insecure", "allow clear-text passwords");
 
     try {
         opts.parse();
 
-        simple_connect connect(address, user, password, sasl, mechs);
+        simple_connect connect(address, user, password, sasl, mechs, insecure);
         proton::container(connect).run();
 
         return 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: NO-JIRA: [go] update comments on supported AMQP types

Posted by ac...@apache.org.
NO-JIRA: [go] update comments on supported AMQP types


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/edf5d5b8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/edf5d5b8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/edf5d5b8

Branch: refs/heads/master
Commit: edf5d5b829853e1434bf1e5b9966a881d2317e3a
Parents: eed5f23
Author: Alan Conway <ac...@redhat.com>
Authored: Wed Mar 14 15:36:34 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Mar 15 09:48:51 2018 -0400

----------------------------------------------------------------------
 proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go   | 3 +--
 proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/edf5d5b8/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
index 33b30a8..99584a2 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
@@ -101,8 +101,7 @@ Go types are encoded as follows
 
 The following Go types cannot be marshaled: uintptr, function, channel, struct, complex64/128
 
-AMQP types not yet supported:
-- decimal32/64/128,
+AMQP types not yet supported: decimal32/64/128
 */
 
 func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/edf5d5b8/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
index 97e8437..2c6e3f1 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
@@ -240,9 +240,7 @@ it unmarshals as type AnyMap.
 The following Go types cannot be unmarshaled: uintptr, function, interface,
 channel, array (use slice), struct
 
-AMQP types not yet supported:
-- decimal32/64/128
-- maps with key values that are not legal Go map keys.
+AMQP types not yet supported: decimal32/64/128
 */
 func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
 	data := C.pn_data(0)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org