Principle: OpenSSL has an open source project on GitHub and we just need to clone the code locally and compile it locally.
Precautions:
1-> on GitHub to get the source code, you have to install git for Windows, URL Https://git-for-windows.github.io
The 2->openssl configuration file needs to be parsed by the Perl language, so the local computer needs to install the Perl script running environment
Perl: https://www.perl.org/get.html I chose the Strawberry version (Strawberry), installed Perl after downloading, the installation directory can be customized, the program will automatically configure the environment variables
Select the directory where you want to install OpenSSL, build a batch file in it, and enter the following content
Echo off& Color 0A::Project NameSetproject=OpenSSL::version label on GitHub: Https://github.com/openssl/openssl/releasesSetvesion=Openssl_1_1_0-pre5::Project PathSetproject_path=%CD%::Code Store PathSetCode_path= "%project_path%\%project%_%vesion%"::GitHub OpenSSL Project URLSetOpenssl_git_url=https://github.com/openssl/openssl.git::Installation PathSetopenssl_install_dir=%CD%::pull source from GitHub on a specific versionif not exist"%code_path%" (git clone-b%vesion% https:Github.com/openssl/openssl.git%code_path%)CD/d "%code_path%"::generate makefile based on configuration with Perl scriptsPerl Configure Vc-win32--prefix=%openssl_install_dir% no-asm::Set the VS Toolset directory, depending on the VS installation path in your computerSetVs_dev_cmd= "D:\Program Files (x86) \microsoft Visual Studio 12.0\common7\tools\vsdevcmd.bat"Pager%vs_dev_cmd%::compilingnmake-f Makefile::test (optional)NMAKE Test::installationNMAKE InstallPause
Wait for the script to finish, OpenSSL is installed, including executables, header files, static libraries
For example
Windows One-click Install OpenSSL