编译FIPS兼容的openssl-1.0.2a

1. 安装Perl和Visual Studio 2010

2. 下载openssl-1.0.2-latest.tar.gz和openssl-fips-2.0.9.tar.gz,并解压到D盘,网址:https://www.openssl.org/source/

3. 打开D:\openssl-fips-2.0.9\ms\do_fips.bat,因为要编译32位的openssl链接库,将17~21行的全部改为使用X86:

if %PROCESSOR_ARCHITECTURE% == x86 goto X86

if %PROCESSOR_ARCHITECTURE% == IA64 goto X86
if %PROCESSOR_ARCHITECTURE% == AMD64 goto X86

4. 打开Visual Studio 2010 command prompt,

进入fips目录:cd D:\openssl-fips-2.0.9,

运行:ms\do_fips no-asm,

编译出的链接库路径为:D:\openssl-fips-2.0.9\out32dll

 

5. 开始编译openssl,

进入openssl目录:cd D:\openssl-1.0.2a,

运行:perl Configure VC-WIN32 no-asm fips --with-fipslibdir=D:\openssl-fips-ecp-2.0.9\out32dll

运行:ms\do_ms

运行:nmake -f ms\ntdll.mak

运行:nmake -f ms\nt.mak

编译出的链接库路径为:D:\openssl-1.0.2a\out32dll

 

Reference: https://groups.google.com/forum/#!topic/mailing.openssl.users/AxJKZB4uBr0

posted on 2015-03-23 20:32  大宴天下  阅读(1819)  评论(0编辑  收藏  举报