summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-06-07 20:48:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-06-07 20:48:09 +0300
commitc763e0be7221cc055d61eec9d30c1ff8a4a0fc32 (patch)
tree683a7d9bfd947c90b9a23e1082adde217edfd6d0 /plugins
parenta3aa7b7d951120525ed510e8da0fcdf58e6beb54 (diff)
fixes #2912 (Drop WinCrypto API support)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OpenSSL/OpenSSL.vcxproj45
-rw-r--r--plugins/OpenSSL/OpenSSL.vcxproj.filters28
-rw-r--r--plugins/OpenSSL/res/version.rc9
-rw-r--r--plugins/OpenSSL/src/main.cpp72
-rw-r--r--plugins/OpenSSL/src/ssl_openssl.cpp417
-rw-r--r--plugins/OpenSSL/src/stdafx.cxx18
-rw-r--r--plugins/OpenSSL/src/stdafx.h46
-rw-r--r--plugins/OpenSSL/src/version.h13
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp2
9 files changed, 2 insertions, 648 deletions
diff --git a/plugins/OpenSSL/OpenSSL.vcxproj b/plugins/OpenSSL/OpenSSL.vcxproj
deleted file mode 100644
index e7d62d396e..0000000000
--- a/plugins/OpenSSL/OpenSSL.vcxproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>OpenSSL</ProjectName>
- <ProjectGuid>{6C0C35E7-6522-403C-BB60-9805CDB9E52F}</ProjectGuid>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
- </ImportGroup>
- <ItemGroup>
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ssl_openssl.cpp" />
- <ClCompile Include="src\stdafx.cxx">
- <PrecompiledHeader>Create</PrecompiledHeader>
- </ClCompile>
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\version.rc" />
- </ItemGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>libcrypto.lib;libssl.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/OpenSSL/OpenSSL.vcxproj.filters b/plugins/OpenSSL/OpenSSL.vcxproj.filters
deleted file mode 100644
index 990d0f77d6..0000000000
--- a/plugins/OpenSSL/OpenSSL.vcxproj.filters
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
- <ItemGroup>
- <ClCompile Include="src\main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\ssl_openssl.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/OpenSSL/res/version.rc b/plugins/OpenSSL/res/version.rc
deleted file mode 100644
index 5a5ddd63ed..0000000000
--- a/plugins/OpenSSL/res/version.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-#include "..\src\version.h"
-
-#include "..\..\build\Version.rc"
diff --git a/plugins/OpenSSL/src/main.cpp b/plugins/OpenSSL/src/main.cpp
deleted file mode 100644
index 32ccfff362..0000000000
--- a/plugins/OpenSSL/src/main.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
-Standard encryption plugin for Miranda NG
-Copyright (C) 2012-21 George Hazan
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include "stdafx.h"
-
-int LoadSslModule(void);
-void UnloadSslModule(void);
-
-struct CMPlugin : public PLUGIN<CMPlugin>
-{
- CMPlugin();
-
- int Load() override;
- int Unload() override;
-}
-g_plugin;
-
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-PLUGININFOEX pluginInfoEx = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- __VERSION_DWORD,
- __DESCRIPTION,
- __AUTHOR,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- // {B649702C-13DE-408A-B6C2-FB8FED2A2C90}
- { 0xb649702c, 0x13de, 0x408a, { 0xb6, 0xc2, 0xfb, 0x8f, 0xed, 0x2a, 0x2c, 0x90 } }
-};
-
-CMPlugin::CMPlugin() :
- PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
-{}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST };
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-int CMPlugin::Load()
-{
- return LoadSslModule();
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-int CMPlugin::Unload()
-{
- UnloadSslModule();
- return 0;
-}
diff --git a/plugins/OpenSSL/src/ssl_openssl.cpp b/plugins/OpenSSL/src/ssl_openssl.cpp
deleted file mode 100644
index 497d58a4e0..0000000000
--- a/plugins/OpenSSL/src/ssl_openssl.cpp
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-21 Miranda NG team (https://miranda-ng.org),
-Copyright (c) 2000-12 Miranda IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-#include <m_popup.h>
-
-static HANDLE g_hSslMutex;
-static bool bSslInitDone;
-
-enum SocketState
-{
- sockOpen,
- sockClosed,
- sockError
-};
-
-struct SslHandle : public MZeroedObject
-{
- ~SslHandle()
- {
- if (session)
- SSL_free(session);
- if (ctx)
- SSL_CTX_free(ctx);
- }
-
- SOCKET s;
- SSL_CTX *ctx;
- SSL *session;
- SocketState state;
-};
-
-static void SSL_library_unload(void)
-{
- /* Load Library Pointers */
- if (!bSslInitDone)
- return;
-
- WaitForSingleObject(g_hSslMutex, INFINITE);
-
- bSslInitDone = false;
- ReleaseMutex(g_hSslMutex);
-}
-
-static bool SSL_library_load(void)
-{
- /* Load Library Pointers */
- if (bSslInitDone)
- return true;
-
- WaitForSingleObject(g_hSslMutex, INFINITE);
-
- if (!bSslInitDone) { // init OpenSSL
- SSL_library_init();
- SSL_load_error_strings();
- // FIXME check errors
-
- bSslInitDone = true;
- }
-
- return bSslInitDone;
-}
-
-const char* SSL_GetCipherName(SslHandle *ssl)
-{
- if (!ssl || !ssl->session)
- return nullptr;
-
- return SSL_CIPHER_get_name(SSL_get_current_cipher(ssl->session));
-}
-
-static void ReportSslError(SECURITY_STATUS scRet, int line, bool = false)
-{
- CMStringW tszMsg(FORMAT, L"SSL connection failure(%x %u) :", scRet, line);
-
- switch (scRet) {
- case 0:
- case ERROR_NOT_READY:
- return;
-
- case SEC_E_INVALID_TOKEN:
- tszMsg += TranslateW_LP(L"Client cannot decode host message. Possible causes: host does not support SSL or requires not existing security package");
- break;
-
- case CERT_E_CN_NO_MATCH:
- case SEC_E_WRONG_PRINCIPAL:
- tszMsg += TranslateW_LP(L"Host we are connecting to is not the one certificate was issued for");
- break;
-
- default:
- wchar_t szMsgBuf[256];
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, scRet, LANG_USER_DEFAULT, szMsgBuf, _countof(szMsgBuf), nullptr);
- tszMsg += szMsgBuf;
- }
-
- Netlib_LogfW(nullptr, tszMsg);
-
- SetLastError(scRet);
- PUShowMessageW(tszMsg.GetBuffer(), SM_WARNING);
-}
-
-void NetlibSslFree(SslHandle *ssl)
-{
- delete ssl;
-}
-
-BOOL NetlibSslPending(HSSL ssl)
-{
- /* return true if there is either unsend or buffered received data (ie. after peek) */
- return ssl && ssl->session && (SSL_pending(ssl->session) > 0);
-}
-
-static bool ClientConnect(SslHandle *ssl, const char*)
-{
- SSL_METHOD *meth = (SSL_METHOD*)SSLv23_client_method();
-
- // contrary to what it's named, SSLv23 announces all supported ciphers/versions,
- // generally TLS1.2 in a TLS1.0 Client Hello
- if (!meth) {
- Netlib_Logf(nullptr, "SSL setup failure: client method");
- return false;
- }
- ssl->ctx = SSL_CTX_new(meth);
- if (!ssl->ctx) {
- Netlib_Logf(nullptr, "SSL setup failure: context");
- return false;
- }
-
- // SSL_read/write should transparently handle renegotiations
- SSL_CTX_ctrl(ssl->ctx, SSL_CTRL_MODE, SSL_MODE_AUTO_RETRY, nullptr);
-
- RAND_screen();
- ssl->session = SSL_new(ssl->ctx);
- if (!ssl->session) {
- Netlib_Logf(nullptr, "SSL setup failure: session");
- return false;
- }
- SSL_set_fd(ssl->session, ssl->s);
-
- int err = SSL_connect(ssl->session);
-
- if (err != 1) {
- err = SSL_get_error(ssl->session, err);
- Netlib_Logf(nullptr, "SSL negotiation failure (%d)", err);
- return false;
- }
-
- const char *suite = SSL_GetCipherName(ssl);
- if (suite != nullptr)
- Netlib_Logf(nullptr, "SSL established with %s", suite);
- return true;
-}
-
-static PCCERT_CONTEXT SSL_X509ToCryptCert(X509 * x509)
-{
- unsigned char *buf = nullptr;
- PCCERT_CONTEXT pCertContext = nullptr;
-
- int len = i2d_X509(x509, &buf);
- if ((len >= 0) && buf) {
- pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, buf, len);
-
- CRYPTO_free(buf, __FILE__, __LINE__);
- }
- return pCertContext;
-}
-
-static PCCERT_CONTEXT SSL_CertChainToCryptAnchor(SSL* session)
-{
- /* convert the active certificate chain provided in the handshake of 'session' into
- the format used by CryptAPI.
- */
- PCCERT_CONTEXT anchor = nullptr;
- // create cert store
- HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, NULL, CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, nullptr);
-
- if (store) {
- X509 *server_cert = SSL_get_peer_certificate(session);
- if (server_cert) {
- // add the server's cert first, to make sure CryptAPI builds the correct chain
- PCCERT_CONTEXT primary_cert;
- BOOL ok = CertAddCertificateContextToStore(store, SSL_X509ToCryptCert(server_cert), CERT_STORE_ADD_ALWAYS, &primary_cert);
- if (ok && primary_cert) {
- // add all remaining certs to store (note: stack needs not be freed, it is not a copy)
- STACK_OF(X509) *server_chain = SSL_get_peer_cert_chain(session);
- if (server_chain) {
- for (int i = 0; i < OPENSSL_sk_num((OPENSSL_STACK *)server_chain); i++) {
- X509 *next_cert = (X509 *)OPENSSL_sk_value((OPENSSL_STACK *)server_chain, i);
- CertAddCertificateContextToStore(store, SSL_X509ToCryptCert(next_cert), CERT_STORE_ADD_USE_EXISTING, nullptr);
- }
- }
-
- // return primary cert; MUST be freed by caller which will free the associated store
- anchor = primary_cert;
- }
- else {
- if (primary_cert)
- CertFreeCertificateContext(primary_cert);
- }
-
- X509_free(server_cert);
- }
-
- CertCloseStore(store, 0);
- }
-
- return anchor;
-}
-
-static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, DWORD dwCertFlags)
-{
- static LPSTR rgszUsages[] =
- {
- szOID_PKIX_KP_SERVER_AUTH,
- szOID_SERVER_GATED_CRYPTO,
- szOID_SGC_NETSCAPE
- };
-
- CERT_CHAIN_PARA ChainPara = { 0 };
- HTTPSPolicyCallbackData polHttps = { 0 };
- CERT_CHAIN_POLICY_PARA PolicyPara = { 0 };
- CERT_CHAIN_POLICY_STATUS PolicyStatus = { 0 };
- PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
- PCCERT_CONTEXT pServerCert = nullptr;
- DWORD scRet;
-
- PWSTR pwszServerName = mir_a2u(pszServerName);
-
- pServerCert = SSL_CertChainToCryptAnchor(ssl->session);
-
- if (pServerCert == nullptr) {
- scRet = SEC_E_WRONG_PRINCIPAL;
- goto cleanup;
- }
-
- ChainPara.cbSize = sizeof(ChainPara);
- ChainPara.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR;
- ChainPara.RequestedUsage.Usage.cUsageIdentifier = _countof(rgszUsages);
- ChainPara.RequestedUsage.Usage.rgpszUsageIdentifier = rgszUsages;
- if (!CertGetCertificateChain(nullptr, pServerCert, nullptr, pServerCert->hCertStore,
- &ChainPara, 0, nullptr, &pChainContext)) {
- scRet = GetLastError();
- goto cleanup;
- }
-
- polHttps.cbStruct = sizeof(HTTPSPolicyCallbackData);
- polHttps.dwAuthType = AUTHTYPE_SERVER;
- polHttps.fdwChecks = dwCertFlags;
- polHttps.pwszServerName = pwszServerName;
-
- PolicyPara.cbSize = sizeof(PolicyPara);
- PolicyPara.pvExtraPolicyPara = &polHttps;
-
- PolicyStatus.cbSize = sizeof(PolicyStatus);
-
- if (!CertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_SSL, pChainContext,
- &PolicyPara, &PolicyStatus)) {
- scRet = GetLastError();
- goto cleanup;
- }
-
- if (PolicyStatus.dwError) {
- scRet = PolicyStatus.dwError;
- goto cleanup;
- }
-
- scRet = SEC_E_OK;
-
-cleanup:
- if (pChainContext)
- CertFreeCertificateChain(pChainContext);
- if (pServerCert)
- CertFreeCertificateContext(pServerCert);
- mir_free(pwszServerName);
-
- ReportSslError(scRet, __LINE__, true);
- return scRet == SEC_E_OK;
-}
-
-SslHandle* NetlibSslConnect(SOCKET s, const char* host, int verify)
-{
- /* negotiate SSL session, verify cert, return NULL if failed */
-
- SslHandle *ssl = new SslHandle();
- ssl->s = s;
- bool res = ClientConnect(ssl, host);
-
- if (res && verify) {
- DWORD dwFlags = 0;
- if (!host || inet_addr(host) != INADDR_NONE)
- dwFlags |= 0x00001000;
- res = VerifyCertificate(ssl, host, dwFlags);
- }
-
- if (res)
- return ssl;
-
- delete ssl;
- return nullptr;
-}
-
-void NetlibSslShutdown(SslHandle *ssl)
-{
- /* Close SSL session, but keep socket open */
- if (ssl == nullptr || ssl->session == nullptr)
- return;
-
- SSL_shutdown(ssl->session);
-}
-
-int NetlibSslRead(SslHandle *ssl, char *buf, int num, int peek)
-{
- /* read number of bytes, keep in buffer if peek!=0 */
- if (!ssl || !ssl->session) return SOCKET_ERROR;
- if (num <= 0) return 0;
-
- int err = 0;
- if (peek)
- err = SSL_peek(ssl->session, buf, num);
- else
- err = SSL_read(ssl->session, buf, num);
-
- if (err <= 0) {
- int err2 = SSL_get_error(ssl->session, err);
- if (err2 == SSL_ERROR_ZERO_RETURN) {
- Netlib_Logf(nullptr, "SSL connection gracefully closed");
- ssl->state = sockClosed;
- return 0;
- }
-
- Netlib_Logf(nullptr, "SSL failure recieving data (%d, %d, %d)", err, err2, WSAGetLastError());
- ssl->state = sockError;
- return SOCKET_ERROR;
- }
-
- return err;
-}
-
-int NetlibSslWrite(SslHandle *ssl, const char *buf, int num)
-{
- /* write number of bytes */
- if (!ssl || !ssl->session) return SOCKET_ERROR;
- if (num <= 0) return 0;
-
- int err = SSL_write(ssl->session, buf, num);
- if (err > 0)
- return err;
-
- int err2 = SSL_get_error(ssl->session, err);
- switch (err2) {
- case SSL_ERROR_ZERO_RETURN:
- Netlib_Logf(nullptr, "SSL connection gracefully closed");
- ssl->state = sockClosed;
- break;
- default:
- Netlib_Logf(nullptr, "SSL failure sending data (%d, %d, %d)", err, err2, WSAGetLastError());
- ssl->state = sockError;
- return SOCKET_ERROR;
- }
- return 0;
-}
-
-static INT_PTR GetSslApi(WPARAM, LPARAM lParam)
-{
- SSL_API *pSsl = (SSL_API*)lParam;
- if (pSsl == nullptr)
- return FALSE;
-
- if (pSsl->cbSize != sizeof(SSL_API))
- return FALSE;
-
- pSsl->connect = NetlibSslConnect;
- pSsl->pending = NetlibSslPending;
- pSsl->read = NetlibSslRead;
- pSsl->write = NetlibSslWrite;
- pSsl->shutdown = NetlibSslShutdown;
- pSsl->sfree = NetlibSslFree;
- return TRUE;
-}
-
-int LoadSslModule(void)
-{
- if (!SSL_library_load()) {
- MessageBoxW(nullptr, TranslateW_LP(L"OpenSSL library loading failed"), TranslateW_LP(L"OpenSSL error"), MB_ICONERROR | MB_OK);
- return 1;
- }
- CreateServiceFunction(MS_SYSTEM_GET_SI, GetSslApi);
- g_hSslMutex = CreateMutex(nullptr, FALSE, nullptr);
- return 0;
-}
-
-void UnloadSslModule(void)
-{
- SSL_library_unload();
- CloseHandle(g_hSslMutex);
-}
diff --git a/plugins/OpenSSL/src/stdafx.cxx b/plugins/OpenSSL/src/stdafx.cxx
deleted file mode 100644
index f70c8f3ec0..0000000000
--- a/plugins/OpenSSL/src/stdafx.cxx
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright (C) 2012-21 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h" \ No newline at end of file
diff --git a/plugins/OpenSSL/src/stdafx.h b/plugins/OpenSSL/src/stdafx.h
deleted file mode 100644
index fa2c4a3fd0..0000000000
--- a/plugins/OpenSSL/src/stdafx.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-21 Miranda NG team (https://miranda-ng.org),
-Copyright (c) 2000-12 Miranda IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#pragma once
-
-#define SECURITY_WIN32
-#define HSSL_DEFINED
-
-typedef struct SslHandle *HSSL;
-
-#include <shlobj.h>
-#include <security.h>
-
-#define DELAYIMP_INSECURE_WRITABLE_HOOKS
-#include <delayimp.h>
-
-#include <newpluginapi.h>
-#include <m_netlib.h>
-#include <m_langpack.h>
-#include <m_ssl.h>
-
-#include <openssl/ssl.h>
-#include <openssl/rand.h>
-
-#include "version.h"
diff --git a/plugins/OpenSSL/src/version.h b/plugins/OpenSSL/src/version.h
deleted file mode 100644
index b706465fe3..0000000000
--- a/plugins/OpenSSL/src/version.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 1
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
-
-#include <stdver.h>
-
-#define __PLUGIN_NAME "OpenSSL SSL API module"
-#define __FILENAME "OpenSSL.dll"
-#define __DESCRIPTION "Core driver to provide OpenSSL-based SSL services. It provides TLS 1.2/1.3 support for legacy operating systems."
-#define __AUTHOR "Miranda NG team"
-#define __AUTHORWEB "https://miranda-ng.org/p/OpenSSL/"
-#define __COPYRIGHT "© 2014-21 Miranda NG team"
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index e177fe13ec..569757fc63 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -572,6 +572,7 @@ static renameTable[] =
{ L"stdidle.dll", nullptr },
{ L"stdhelp.dll", nullptr },
{ L"stdauth.dll", nullptr },
+ { L"stdssl.dll", nullptr },
{ L"advaimg.dll", nullptr },
{ L"aim.dll", nullptr },
@@ -591,6 +592,7 @@ static renameTable[] =
{ L"msvcp100.dll", nullptr },
{ L"msvcr100.dll", nullptr },
{ L"mtextcontrol.dll", nullptr },
+ { L"openssl.dll", nullptr },
{ L"sms.dll", nullptr },
{ L"tlen.dll", nullptr },
{ L"whatsapp.dll", nullptr },