From 3ec716dc906a43d155ab6222856c5a606f491bc8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 8 Oct 2020 22:56:11 +0300 Subject: OpenSSL upgraded to 1.1.1 --- src/mir_app/mir_app.vcxproj | 3 +- src/mir_app/mir_app.vcxproj.filters | 3 -- src/mir_app/src/miranda.cpp | 4 --- src/mir_app/src/openssl.cpp | 67 ------------------------------------- src/mir_app/src/openssl.h | 30 ----------------- 5 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 src/mir_app/src/openssl.cpp delete mode 100644 src/mir_app/src/openssl.h (limited to 'src') diff --git a/src/mir_app/mir_app.vcxproj b/src/mir_app/mir_app.vcxproj index 224fc3f656..8658ff5b87 100644 --- a/src/mir_app/mir_app.vcxproj +++ b/src/mir_app/mir_app.vcxproj @@ -125,7 +125,6 @@ - @@ -188,7 +187,7 @@ src/mir_app64.def /ignore:4197 %(AdditionalOptions) type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;type=%27win32%27 name=%27Microsoft.Windows.Gdiplus%27 version=%271.0.0.0%27 processorArchitecture=%27amd64%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) - libeay32.lib;%(AdditionalDependencies) + libcrypto.lib;%(AdditionalDependencies) res/miranda32.exe.manifest diff --git a/src/mir_app/mir_app.vcxproj.filters b/src/mir_app/mir_app.vcxproj.filters index e47a9bfbae..1db664ca70 100644 --- a/src/mir_app/mir_app.vcxproj.filters +++ b/src/mir_app/mir_app.vcxproj.filters @@ -296,9 +296,6 @@ Source Files - - Source Files - Source Files diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index 17d415d8e5..5ebd3a1d92 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "stdafx.h" -#include "openssl.h" #if defined(VLD_ENABLED) #include "msapi\vld.h" @@ -339,8 +338,6 @@ int WINAPI mir_main(LPTSTR cmdLine) if (IsWinVer7Plus()) CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface); - OpenSSL_Init(); - g_pSystemWindow = new MSystemWindow(); g_pSystemWindow->Create(); @@ -425,7 +422,6 @@ int WINAPI mir_main(LPTSTR cmdLine) delete g_pSystemWindow; - OpenSSL_Cleanup(); OleUninitialize(); if (bufferedPaintUninit) diff --git a/src/mir_app/src/openssl.cpp b/src/mir_app/src/openssl.cpp deleted file mode 100644 index 144e3df169..0000000000 --- a/src/mir_app/src/openssl.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-20 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 "openssl.h" - - -static HANDLE *mutexes; - -unsigned long OpenSSL_thread_id() -{ - return static_cast(GetCurrentThreadId()); -} - -void OpenSSL_lock(int mode, int n, const char *, int) -{ - if (mode & CRYPTO_LOCK) { - WaitForSingleObject(mutexes[n], INFINITE); - } else { - ReleaseMutex(mutexes[n]); - } -} - -void OpenSSL_Init() { - int num_locks = CRYPTO_num_locks(); - - mutexes = new HANDLE[num_locks]; - - for (int i = 0; i < num_locks; ++i) { - mutexes[i] = CreateMutex(nullptr, FALSE, nullptr); - } - - CRYPTO_set_id_callback(OpenSSL_thread_id); - CRYPTO_set_locking_callback(OpenSSL_lock); -} - -void OpenSSL_Cleanup(){ - CRYPTO_set_id_callback(nullptr); - CRYPTO_set_locking_callback(nullptr); - - for (int i = 0; i < CRYPTO_num_locks(); ++i) { - CloseHandle(mutexes[i]); - } - - delete[] mutexes; -} \ No newline at end of file diff --git a/src/mir_app/src/openssl.h b/src/mir_app/src/openssl.h deleted file mode 100644 index 8a2a493ab1..0000000000 --- a/src/mir_app/src/openssl.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-20 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 - -#include - -void OpenSSL_Init(); -void OpenSSL_Cleanup(); -- cgit v1.2.3