Build Openssl with Visual Studio and NASM

We’ve talked about how to build openssl with msys2 and Mingw. Today, I will talk about how to build openssl with Visual Studio 2017 and NASM.

step1: download/install required software

You can download openssl source code from its official website. We’ll download openssl-1.1.1s to build. Download and install strawberry perl. Don’t use ActiveState perl which requires login and behaviors like rogue app. Download and install nasm. Add the path to perl.exe and nasm.exe to PATH environment variable.

step2: configure and build

We’ll build openssl for x64 (64bit) so open a x64 Native Tools Command Prompt for VS 2017(you can find the menu item under the VS 2017 menu in start menu). Run the following commands in order:

perl Configure VC-WIN64A --prefix=d:\openssl-1.1.1s --openssldir=d:\openssl-1.1.1s
nmake
nmake install

If you need to build 32bit openssl, change the configure command to

perl Configure VC-WIN32 --prefix=d:\openssl-1.1.1s --openssldir=d:\openssl-1.1.1s

Note that you’d better specify the –prefix and –openssldir parameters and let them point to the same location, the directory you install built openssl binaries, libs, and header files to. If you don’t specify the two parameters, it will install openssl to C:\Program Files\OpenSSL by default, but you may have no privilege to install an application to that protected directory. I don’t know the difference between –prefix and –openssldir, and I don’t know what is done under the hood using these two parameters, just keep them the same.

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply