From f1a2ce4bcb7d46981d1fc471e517709f076d9365 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 8 May 2022 01:01:29 +0800 Subject: refactor: develop 2.0.6 start 1. delete smtp ability 2. change libs link type to dramatic --- src/core/function/GlobalSettingStation.cpp | 45 ------------------------------ 1 file changed, 45 deletions(-) (limited to 'src/core/function/GlobalSettingStation.cpp') diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp index 8850cbe4..e20188f2 100644 --- a/src/core/function/GlobalSettingStation.cpp +++ b/src/core/function/GlobalSettingStation.cpp @@ -28,10 +28,6 @@ #include "GlobalSettingStation.h" -#include -#include - -#include #include #include "core/function/FileOperator.h" @@ -95,47 +91,6 @@ GpgFrontend::GlobalSettingStation::GlobalSettingStation(int channel) noexcept } } -void GpgFrontend::GlobalSettingStation::AddRootCert( - const std::filesystem::path &path) { - std::string out_buffer; - if (!FileOperator::ReadFileStd(path, out_buffer)) { - LOG(ERROR) << _("Failed to read root certificate file") << path; - return; - } - - auto mem_bio = std::shared_ptr( - BIO_new_mem_buf(out_buffer.data(), static_cast(out_buffer.size())), - [](BIO *_p) { BIO_free(_p); }); - - auto x509 = std::shared_ptr( - PEM_read_bio_X509(mem_bio.get(), nullptr, nullptr, nullptr), - [](X509 *_p) { X509_free(_p); }); - - if (!x509) return; - - root_certs_.push_back(x509); -} - -vmime::shared_ptr -GpgFrontend::GlobalSettingStation::GetCertVerifier() const { - auto p_cv = - vmime::make_shared(); - - std::vector> - _root_certs; - for (const auto &cert : root_certs_) { - _root_certs.push_back( - std::make_shared( - cert.get())); - } - return p_cv; -} - -const std::vector> - &GpgFrontend::GlobalSettingStation::GetRootCerts() { - return root_certs_; -} - void GpgFrontend::GlobalSettingStation::init_app_secure_key() {} GpgFrontend::GlobalSettingStation::~GlobalSettingStation() noexcept = default; -- cgit v1.2.3 From 7c17ee7a03486a098e0a645cf65d29db87444fbf Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 8 May 2022 02:47:24 +0800 Subject: fix: remove vmime include --- src/core/function/GlobalSettingStation.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/function/GlobalSettingStation.cpp') diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp index e20188f2..db8d1bc3 100644 --- a/src/core/function/GlobalSettingStation.cpp +++ b/src/core/function/GlobalSettingStation.cpp @@ -28,8 +28,6 @@ #include "GlobalSettingStation.h" -#include - #include "core/function/FileOperator.h" void GpgFrontend::GlobalSettingStation::SyncSettings() noexcept { -- cgit v1.2.3