Following snippet from my code is enough to reproduce the issue.
mqtt::ssl_options opts;
opts.set_enable_server_cert_auth(true);
opts.set_ssl_version(MQTT_SSL_VERSION_TLS_1_2);
// opts.set_enabled_cipher_suites() TODO: Do we want to restrict cipher list?
opts.set_key_store(variant.certificate);
opts.set_private_key(variant.key);
opts.ca_path(variant.certificateAuthorityDir);
opts.set_error_handler([](const std::string& errMsg) {
//...
});
optsBuilder.ssl(std::move(opts));
auto tok = client_.connect(opts);
tok->wait();
This should by easy to fix.
Hack-fix - in case someone having the same issue can't wait until the member variable gets copied/moved correctly in next library release:
...
optsBuilder.ssl(std::move(opts));
mqtt::ssl_options& sslOpts = const_cast<mqtt::ssl_options&>(opts.get_ssl_options());
sslOpts.ca_path(tlsSetup->certificateAuthorityDir);
auto tok = client_.connect(opts);
...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4