• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Win10_64bit源码nmake方式安装OpenSSL

武飞扬头像
huaqianzkh
帮助1

1.概述

官网:

https://www.openssl.org/

学新通

  1.  
    Quick start
  2.  
    1.Install Perl
  3.  
    2.Install NASM
  4.  
    3.Make sure both Perl and NASM are on your %PATH%
  5.  
    4.Use Visual Studio Developer Command Prompt with administrative privileges, choosing one of its variants depending on the intended
  6.  
    rchitecture. Or run cmd and execute vcvarsall.bat with one of the options x86, x86_amd64, x86_arm, x86_arm64, amd64, amd64_x86,
  7.  
    amd64_arm, or amd64_arm64. This sets up the environment variables needed for nmake.exe, cl.exe, etc. See also
  8.  
    https://docs.microsoft.com/cpp/build/building-on-the-command-line
  9.  
     
  10.  
    5.From the root of the OpenSSL source directory enter
  11.  
    perl Configure VC-WIN32 if you want 32-bit OpenSSL or
  12.  
    perl Configure VC-WIN64A if you want 64-bit OpenSSL or
  13.  
    perl Configure VC-WIN64-ARM if you want Windows on Arm (win-arm64) OpenSSL or
  14.  
    perl Configure to let Configure figure out the platform
  15.  
    6.nmake
  16.  
    7.nmake test
  17.  
    8.nmake install
学新通

2.安装Perl

官网:

Strawberry Perl for Windows

学新通 

选择zip压缩包最新版本下载。

学新通

压缩包strawberry-perl-5.32.1.1-64bit.zip解压到合适目录,并配置环境变量。

学新通

3.安装NASM

官网:

https://www.nasm.us/

学新通

选择最新版本windows64版本zip压缩包,这里是2.16.01。下载后解压

nasm-2.16.01-win64.zip到合适目录并配置环境变量。

学新通

4.安装Visual Studio

官网:

Visual Studio: IDE and Code Editor for Software Developers and Teams

安装过程不赘述。

Nmake 需要配置好系统环境变量。

学新通

5.下载OpenSSL源码zip包

学新通

学新通

6.根据步骤完成设置

6.1打开visualstudio2019命令行

学新通

 学新通

 6.2进入oppensl源码路径

学新通

6.3按概述部分中的第5步操作:

  1.  
    5.From the root of the OpenSSL source directory enter
  2.  
    perl Configure VC-WIN32 if you want 32-bit OpenSSL or
  3.  
    perl Configure VC-WIN64A if you want 64-bit OpenSSL or
  4.  
    perl Configure VC-WIN64-ARM if you want Windows on Arm (win-arm64) OpenSSL or
  5.  
    perl Configure to let Configure figure out the platform

在窗口中输入perl Configure VC-WIN64A,然后回车运行

学新通

 接下来就需要等待一会,等待生成一些新的文件。
生成完成之后就会出现 OpenSSL has been successfully configured 的字样。

学新通

6.4 使用nmake命令进行编译

在窗口中输入nmake,然后回车
注意,此步骤大概需要30min左右时间

这步往后是用X64 Native Tools Command Prompt管理员身份打开的命令行。

学新通 

学新通

6.5 使用nmake test对构建完成之后的模块进行测试

在窗口中输入nmake test,然后回车
注意,此步骤大概需要30min左右时间
如果测试成功,最后一行会出现Result:PASS字样

6.6 安装nmake install

在窗口中输入nmake install,然后回车
注意,此步骤大概需要30min左右时间
此步骤完成之后便可关闭窗口

学新通

生成的Openssl在路径 C:/Program Files/OpenSSL中。

选择bin文件夹的路径,将路径复制到环境变量中即可。

7.检验OpenSSL

按住 shift键 鼠标右击桌面,点击“在此处打开powershell窗口”,输入openssl version 查看,如果安装完成,即可显示出openssl当前的版本。至此,就要恭喜你openssl已经在你的电脑上安装完成了!

学新通

注:visual studio 2019 如果没有安装nmake,则需要自己通过visual studio Installer安装相关的vc 组件。

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhggehce
系列文章
更多 icon
同类精品
更多 icon
继续加载