MCPcopy Create free account
hub / github.com/apache/qpid-proton / test_tls_default_fail

Class test_tls_default_fail

cpp/src/connect_config_test.cpp:221–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219};
220
221class test_tls_default_fail : public test_handler {
222 static connection_options make_opts() {
223 ssl_certificate cert("testdata/certs/server-certificate.pem",
224 "testdata/certs/server-private-key.pem",
225 "server-password");
226 connection_options opts;
227 opts.ssl_server_options(ssl_server_options(cert));
228 return opts;
229 }
230 bool failed_;
231
232 public:
233
234 test_tls_default_fail() : test_handler(make_opts()), failed_(false) {}
235
236 void on_listener_start(proton::container& c) override {
237 connect(c, R"("scheme":"amqps")");
238 }
239
240 void on_messaging_error(const proton::error_condition& c) override {
241 if (failed_) return;
242
243 ASSERT_SUBSTRING("verify failed", c.description());
244 failed_ = true;
245 stop_listener();
246 }
247
248 void run() {
249 container(*this).run();
250 ASSERT(failed_);
251 }
252};
253
254class test_tls_external : public test_handler {
255

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68