implement ecdsa
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "openssl_utils.hpp"
|
||||
#include "registration.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "ref.hpp"
|
||||
#include "irc_coroutine.hpp"
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
@@ -36,6 +37,9 @@ static auto start(boost::asio::io_context &io, const Settings &settings) -> void
|
||||
|
||||
const auto connection = std::make_shared<Connection>(io);
|
||||
const auto client = Client::start(*connection);
|
||||
Ref<EVP_PKEY> sasl_key;
|
||||
if (not settings.sasl_key_file.empty())
|
||||
sasl_key = key_from_file(settings.sasl_key_file, settings.sasl_key_password);
|
||||
Registration::start({
|
||||
.nickname = settings.nickname,
|
||||
.realname = settings.realname,
|
||||
@@ -45,6 +49,7 @@ static auto start(boost::asio::io_context &io, const Settings &settings) -> void
|
||||
.sasl_authcid = settings.sasl_authcid,
|
||||
.sasl_authzid = settings.sasl_authzid,
|
||||
.sasl_password = settings.sasl_password,
|
||||
.sasl_key = std::move(sasl_key),
|
||||
}, client);
|
||||
|
||||
const auto bot = Bot::start(client);
|
||||
|
@@ -17,6 +17,8 @@ auto Settings::from_stream(std::istream &in) -> Settings
|
||||
.sasl_authcid = config["sasl_authcid"].value_or(std::string{}),
|
||||
.sasl_authzid = config["sasl_authzid"].value_or(std::string{}),
|
||||
.sasl_password = config["sasl_password"].value_or(std::string{}),
|
||||
.sasl_key_file = config["sasl_key_file"].value_or(std::string{}),
|
||||
.sasl_key_password = config["sasl_key_password"].value_or(std::string{}),
|
||||
.tls_hostname = config["tls_hostname"].value_or(std::string{}),
|
||||
.tls_certfile = config["tls_certfile"].value_or(std::string{}),
|
||||
.tls_keyfile = config["tls_keyfile"].value_or(std::string{}),
|
||||
|
@@ -16,6 +16,8 @@ struct Settings
|
||||
std::string sasl_authcid;
|
||||
std::string sasl_authzid;
|
||||
std::string sasl_password;
|
||||
std::string sasl_key_file;
|
||||
std::string sasl_key_password;
|
||||
|
||||
std::string tls_hostname;
|
||||
std::string tls_certfile;
|
||||
|
Reference in New Issue
Block a user