openssl 在windows下的安装

在win10下安装openssl

在 《openssl编程》一书中 , 有openssl的安装方法, 可能是版本比较旧的问题 ,在我的机器上报错

书上安装步骤如下:

  1. 安装 VC6.0; 0.9.7i 及以上版本支持 VC++ 2005
  2. 安装 perl5;
    3) 解压 openssl;
    4) 在控制台下进入 openssl 目录;
    5) 运行 perl Configure VC-WIN32,其他可选项参见 2.2.1 节;
    6) ms\do_ms.bak
    7) nmake -f ms\ntdll.mak(动态库)或者 nmake –f ms\nt.mak(静态库);

在第5步时报错:

NASM not found - please read INSTALL and NOTES.WIN for further details

我的版本为 openssl-1.1.0f 

于是按照提示 , 在目录下找到 INSTALL 文件 , 文档说 windows下安装是这样的

$ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
$ nmake
$ nmake test
$ nmake install

但是第一步执行perl Configure VC-WIN64A 就报相同的错误

搜索这个错误 , 在某个页面中提到了可以使用 no-asm 选项
于是perl Configure VC-WIN64A no-asm 正确执行了!
接下来的步骤就和官方文档一样

nmake
nmake test
nmake install 

可以使用--prefix --openssldir 指定目录 , 如果没有 , 默认为 C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL

注意使用vs的cmd工具 , 系统自带的听说有问题 , 没有尝试

posted @ 2017-07-13 13:43  tan00  阅读(1585)  评论(1)    收藏  举报