void on_container_start(proton::container& c) override {
     auto&& copts = proton::connection_options()
         .sasl_allow_insecure_mechs(true)
         .sasl_allowed_mechs("ANONYMOUS PLAIN")
     ;
     c.listen("0.0.0.0", copts);
 }
Example #2
0
    void on_container_start(proton::container &c) override {
        // Configure listener.  Details vary by platform.
        ssl_certificate server_cert = platform_certificate("tserver", "tserverpw");
        ssl_server_options ssl_srv(server_cert);
        connection_options server_opts;
        server_opts.ssl_server_options(ssl_srv).handler(&s_handler);
        c.server_connection_options(server_opts);

        // Configure client with a Certificate Authority database populated with the server's self signed certificate.
        // Since the test certifcate's credentials are unlikely to match this host's name, downgrade the verification
        // from VERIFY_PEER_NAME to VERIFY_PEER.
        connection_options client_opts;
        ssl_client_options ssl_cli(platform_CA("tserver"), proton::ssl::VERIFY_PEER);
        client_opts.ssl_client_options(ssl_cli);
        c.client_connection_options(client_opts);

        s_handler.acceptor = c.listen(url);
        c.open_sender(url);
    }
Example #3
0
    void on_container_start(proton::event &e, proton::container &c) override {
        // Configure listener.  Details vary by platform.
        ssl_certificate server_cert = platform_certificate("tserver", "tserverpw");
        std::string client_CA = platform_CA("tclient");
        // Specify an SSL domain with CA's for client certificate verification.
        ssl_server_options srv_ssl(server_cert, client_CA);
        connection_options server_opts;
        server_opts.ssl_server_options(srv_ssl).handler(&s_handler);
        server_opts.sasl_allowed_mechs("EXTERNAL");
        c.server_connection_options(server_opts);

        // Configure client.
        ssl_certificate client_cert = platform_certificate("tclient", "tclientpw");
        std::string server_CA = platform_CA("tserver");
        // Since the test certifcate's credentials are unlikely to match this host's name, downgrade the verification
        // from VERIFY_PEER_NAME to VERIFY_PEER.
        ssl_client_options ssl_cli(client_cert, server_CA, proton::ssl::VERIFY_PEER);
        connection_options client_opts;
        client_opts.ssl_client_options(ssl_cli).sasl_allowed_mechs("EXTERNAL");
        c.client_connection_options(client_opts);

        s_handler.inbound_listener = c.listen(url);
        c.open_sender(url);
    }
Example #4
0
 void on_container_start(proton::container &c) override {
     c.listen(url);
     std::cout << "server listening on " << url << std::endl;
 }
Example #5
0
 void on_container_start(proton::event &e, proton::container &c) override {
     acceptor = c.listen(url);
     std::cout << "direct_send listening on " << url << std::endl;
 }
Example #6
0
 void on_container_start(proton::event &e, proton::container &c) override {
     c.listen(url_);
     std::cout << "broker listening on " << url_ << std::endl;
 }