Compiling OpenSSL under Windows

Source: Internet
Author: User
Tags install openssl openssl openssl library win32 microsoft website
how to compile OpenSSL under Windows.

Yanqing-wang (Intel) in Sunday, 22/12/2013-23:48 submitted

OpenSSL is an Open-source Third-party library that implements the SSL (Secure Socketlayer) and TLS (transport Layer Security) protocols, which are used by a wide range of enterprise applications. For general developers, it is a good way to save time and effort to download the compiled OpenSSL library on http://slproweb.com/products/Win32OpenSSL.html. For advanced development users, they may need to modify or crop OpenSSL appropriately, so compiling it becomes a key issue. This blog is mainly about how to compile the OpenSSL library on early windows.

The author succeeded in compiling the OpenSSL library according to certain steps as follows:

1 on the Microsoft website to download and install vs Studio, the author blog When the latest version is 2013, connected as follows: http://msdn.microsoft.com/subscriptions/downloads/#searchTerm = &productfamilyid=529&languages=en&pagesize=10&pageindex=0&fileid=0.

2 download and install ActivePerl from Http://www.activestate.com/activeperl/downloads.

3 Download and install NASM assembler from http://www.nasm.us/.

4 Download and install OpenSSL's latest release package from http://www.openssl.org/. When I write a blog, the latest OpenSSL package is: 4459777 Feb 16:34:23 2013 openssl-1.0.1e.tar.gz (MD5) (SHA1) (PGP sign) [LATEST]

It should be stressed here that the reader does not necessarily have to follow the author's steps to compile the OpenSSL library, where the partial order is interchangeable.

After completing all of the above 5 steps, we can extract the OpenSSL package and modify it to compile it. After decompression, all the source code is placed in the openssl-1.0.1e directory, in this directory, there are two files Install.w32, INSTALL. W64 need to be watched. Open any one of these files and you will see how to compile the OpenSSL steps. Here, I will be long-winded again.

1 Open the VS Studio command line tool, as shown in Figure 1. If you compile a 64-bit OpenSSL library, open the visual Studio x64 Win64 Command Prompt, and vice versa.

Figure 1

2 Configure the compilation file and install directory;

Compile Win32:perl Configure vc-win32--prefix=c:\some\openssl\dir

Compile Win64:perl Configure vc-win64a

The "C:\some\openssl\dir" directory can be changed to any installation directory you want.

3 Build the compiling environment:

Ms\do_nasm

Ms\do_ms

For 64-bit compilation, replace Ms\do_ms with ms\do_win64a

4) Compiling OpenSSL

Nmake-f Ms\ntdll.mak

5 Install the compiled build library to "C:\some\openssl\dir"

Nmake-f Ms\ntdll.mak Install

Have you done it after the execution? If not, is not forgotten in the middle of a step.

Study Questions

1 in Win64 compilation, there is a vc-win64i configuration option, which represents what.

2 If you do not want to use assembly code, then how to deal with it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.