OpenSSL 在Windows的安装(参照官方文档)

开篇说明

优秀成熟的开源项目,文档都是很完备的,不过大多数是英文的。为了准确和快速,以下参照OpenSSL官方说明文档,安装OpenSSL-1.1.0C.

官方安装说明文档

  • 1. 主参照文档:INSTALL

    安装前提:

    To install OpenSSL, you will need:

    • A make implementation
    • Perl 5 with core modules (please read NOTES.PERL)
    • The perl module Text::Template (please read NOTES.PERL)
    • an ANSI C compiler
    • a development environment in the form of development libraries and C
      header files
    • a supported operating system

    安装步骤:

    • on Unix:
      $ ./config
      $ make
      $ make test
      $ make install

    • on OpenVMS:
      $ @config
      $ mms
      $ mms test
      $ mms install

    • on Windows (only pick one of the targets for configuration):
      $ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
      $ nmake
      $ nmake test
      $ nmake install

  • 2. 次参照文档:NOTES.WIN

    依赖软件:

    In addition to the requirements and instructions listed in INSTALL,
    this are required as well:

    • You need Perl. We recommend ActiveState Perl, available from https://www.activestate.com/ActivePerl.
      You also need the perl module Text::Template, available on CPAN. Please read NOTES.PERL for more information.

    • You need a C compiler. OpenSSL has been tested to build with these:
      Visual C++

    • Netwide Assembler, a.k.a. NASM, available from http://www.nasm.us, is required if you intend to utilize assembler modules. Note that NASM is the only supported assembler. The Microsoft provided assembler is NOT supported.

    默认安装目录:

    The default installation directories are derived from environment variables.

    • For VC-WIN32, the following defaults are use:
      • PREFIX: %ProgramFiles(86)%\OpenSSL
      • OPENSSLDIR: %CommonProgramFiles(86)%\SSL
    • For VC-WIN64, the following defaults are use:
      • PREFIX: %ProgramW6432%\OpenSSL
      • OPENSSLDIR: %CommonProgramW6432%\SSL

安装步骤

1. 依赖软件的安装

  • VC++

    执行VC\Bin\vcvars32.bat, 将VC加入到系统环境变量

  • ActivePerl 5

  • NASM

    将NASM安装目录加入到系统变量PATH中

2. 配置OpenSSL

进入OpenSSL源代码主目录,执行:

perl Configure VC-WIN32

配置成功图例:
配置OpenSSL图例

3. 编译构建OpenSSL

执行命令:

nmake

这一步执行的时间较长,实际是VC 的 cl.exe命令编译链接的过程。
执行结果:
这里写图片描述
编译前后目录变化:
这里写图片描述

4. 测试编译生成的库

上一步生成了重要的库文件:
这里写图片描述

执行命令测试库文件的正确性:

nmake test

执行结果:
这里写图片描述

5. 安装OpenSSL

执行命令:

nmake install

默认安装目录:

C:\Program Files\OpenSSL

执行结果:
这里写图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值