openssl编译

关于windows下,openssl编译

环境准备
  1. 安装 perl:https://djvniu.jb51.net/200906/tools/ActivePerl5_64.rar

  2. 安装nasm:https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/win64/nasm-2.13.01-installer-x64.exe

  3. 下载opensll源码:https://openssl-library.org/source/old/3.0/index.html

  4. 加入系统PATH变量

  5. 验证

    #验证perl
    perl --version
    #验证nasm
    nasm --version

编译

打开vs 工具=>命令行=>开发者命令提示 (如果配置环境变量之前vs已打开,则关闭vs之后重新打开),不要使用cmd,会提示找不到nmake

cpp 复制代码
#默认Release
#--prefix 需要绝对路径
perl configure VC-WIN64A --prefix=F:\project\openssl-3.0.14\build\vs2019\release\
nmake 
nmake test
nmake install

configuer option:default Release /MD

cpp 复制代码
- `perl Configure VC-WIN32`     if you want 32-bit OpenSSL or
- `perl Configure VC-WIN64A`    if you want 64-bit OpenSSL or
- `perl Configure VC-WIN64-ARM` if you want Windows on Arm (win-arm64)
Debug or Release
cpp 复制代码
#Release
`perl Configure VC-WIN64A`

#debug recommand
`perl Configure VC-WIN64A --debug`
or
`perl Configure debug-VC-WIN64A`
静态库
cpp 复制代码
#如果指定no-shared则默认MT,否则默认MD
#lib & MD
perl Configure VC-WIN32 -static 

#lib & MT
perl Configure VC-WIN32 -static no-shared
/MD /MT
cpp 复制代码
#MT
perl configure VC-WIN64A -static no-shared /MTd --debug
perl configure VC-WIN64A -static no-shared /MT 
#MD
perl configure VC-WIN64A -static /MDd --debug
perl configure VC-WIN64A -static /MD 
demo
cpp 复制代码
    perl configure VC-WIN64A -static no-shared /MTd --prefix=F:\project\openssl-3.0.14\build\vs2019static\debug\ --debug
DOC
cpp 复制代码
查看源文件目录下:NOTES-*.md INSTALL.md
编译 1.x.x版本

整体和上面没有区别,当arch不匹配的时候会报错。

1.编译x86,以管理员身份打开x86 Native Tools Command Prompt for VS 2019

2.编译x64,以管理员身份打开x64 Native Tools Command Prompt for VS 2019

相关推荐
小羊没烦恼!1 天前
初探性能优化——2个月到4小时的性能提升
java·开发语言·windows·算法·c#
rockmelodies1 天前
# Windows Server2008 R2 Standard(SP1镜像U盘)重置本地管理员密码【完整详细步骤】
windows·密码破解
Lsetea1 天前
证书没到期却报certificate has expired:OpenSSL定位中间证书与系统时间
运维·https·ssl证书·openssl·证书链
kakakahahahaha1 天前
Windows C盘空间不足的安全清理与迁移流程
windows·电脑·笔记本电脑·软件需求·c盘清理
做咩啊~1 天前
远程连接提示:身份验证错误,要求的函数不受支持
windows
百事牛科技2 天前
PPT只读怎么取消?四种情况分别处理
windows·powerpoint
Lsetea2 天前
Nginx报No required SSL certificate was sent:mTLS客户端证书排查
运维·nginx·https·ssl·openssl
熊明才2 天前
WSL2 网络突然瘫痪(Network is unreachable / 没有 eth0)最短修复指南(2026年9月20日亲测可用)
linux·windows·wsl2
xbzb2 天前
Windows 启动故障修复知识整理:蓝屏 / 无限重启 / 盘符 X / 无 PE 盘
windows
我命由我123453 天前
Mac 操作系统 - 一些使用记录
运维·windows·学习·系统安全·运维开发·mac·学习方法