Temporary workaround for authenticating moonlight-embedded version

This commit is contained in:
loki
2020-01-12 16:56:44 +01:00
parent c5ee7fd008
commit 7de0073644
2 changed files with 14 additions and 5 deletions

View File

@@ -670,12 +670,13 @@ void start() {
// Ugly hack for verifying certificates, see crypto::cert_chain_t::verify() for details
ctx->set_verify_callback([&cert_chain, add_cert](int verified, boost::asio::ssl::verify_context &ctx) {
util::fail_guard([&]() {
auto fg = util::fail_guard([&]() {
char subject_name[256];
auto x509 = ctx.native_handle();
X509_NAME_oneline(X509_get_subject_name(X509_STORE_CTX_get_current_cert(x509)), subject_name, sizeof(subject_name));
BOOST_LOG(info) << subject_name << " -- "sv << (verified ? "verfied"sv : "denied"sv);
});