Building OpenSSL 3.0.2 with MSVC 2022

Download OpenSSL sources and extract them with Bash:

tar -xvzf /c/Users/D-Ef/Downloads/openssl-3.0.2.tar.gz

Download NASM, open x64 Native Tools Command Prompt for VS 2022 and run the following commands:

set PATH=%PATH%;E:\PFiles\nasm-2.15.05
where nasm
set PATH=%PATH%;E:\PFiles\Strawberry\perl\bin
where perl
set MY_INSTALL_DIR=E:\libs\OpenSSL
echo %MY_INSTALL_DIR%
perl Configure VC-WIN64A --prefix="%MY_INSTALL_DIR%" --openssldir="%MY_INSTALL_DIR%"

If you got this:

Configuring OpenSSL version 3.0.2 for target VC-WIN64A
Using os-specific seed configuration
Creating configdata.pm
Running configdata.pm
Creating makefile.in
Creating makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************

run nmake:

set CL=/MP
nmake
nmake install

It installs the following files to E:\libs\OpenSSL:

bin
certs
html
include
lib
misc
private
ct_log_list.cnf
ct_log_list.cnf.dist
openssl.cnf
openssl.cnf.dist

bin folder contains the following DLLs:

libcrypto-3-x64.dll
libssl-3-x64.dll

Leave a Reply

Your email address will not be published. Required fields are marked *