在Window 10 64位电脑上安装 OpenSSL安装过程

article/2025/8/4 13:02:25

前期准备

  1. 安装最新版的ActivePerl
  2. 到https://www.openssl.org 下载最新OpenSSL源码
  3. 到http://www.nasm.us 下载NASM汇编工具
  4. 在开始任务栏里打开vc2010的工具文件夹,如图所示:
    Visual Studio命令提示
    选择Visual Studio命令提示如果是编译64位的openssl,应该打开的Visual Studio x64兼容工具,ps: 本人没测试
    4.解压open-master.zip(我是从github上下载的),在目录下找到INSTALL文件,用记事本或其他文本工具打开,可以看到提示信息,如图所示:

编译过程及可能出现的问题


第一步:perl configure VC-WIN32 –prefix=c:\OpenSSL
第二步:nmake
第三步:nmake test 【测试目前支持的一些算法】
第四步:nmake install

on Windows (only pick one of the targets for configuration):
1. perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
2. nmake
3. nmake test
4. nmake install


可能出现的问题:
1. 无法找到perl 或nasm 或ias等
首先确保系统环境变量里有perl的文件夹路径,在安装ActivePerl的时候,有选择 add to system path,一定要记得勾上。或者在安装完后,可以手动将路径加到系统变量里,或者在当前命令提示框里输入set PATH=%PATH%;[PERL_DIR] PERL_DIR 要换成自己电脑的实际路径该方法仅对当前有效。不是永久性的。
如果是vc相关的工具命令无法找到,那么请检查你使用的命令提示框是不是正确的。

执行nmake test输出信息

运行时间比较长,耐心等待,以下是输出结果:

d:\MyFloder\openssl-master>nmake test
Microsoft (R) 程序维护实用工具 10.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。
set SRCTOP=.
set BLDTOP=.
set PERL=C:\Perl64\bin\perl.exe
set OPENSSL_DEBUG_MEMORY=on
“C:\Perl64\bin\perl.exe” “.\test\run_tests.pl”
test\recipes\01-test_abort.t ………… ok
test\recipes\01-test_sanity.t ……….. ok
test\recipes\01-test_symbol_presence.t .. ok
test\recipes\02-test_ordinals.t ……… ok
test\recipes\03-test_internal.t ……… ok
test\recipes\05-test_bf.t …………… ok
test\recipes\05-test_cast.t …………. ok
test\recipes\05-test_des.t ………….. ok
test\recipes\05-test_hmac.t …………. ok
test\recipes\05-test_idea.t …………. ok
test\recipes\05-test_md2.t ………….. skipped: md2 is not supported by this OpenSSL build
test\recipes\05-test_md4.t ………….. ok
test\recipes\05-test_md5.t ………….. ok
test\recipes\05-test_mdc2.t …………. ok
test\recipes\05-test_rand.t …………. ok
test\recipes\05-test_rc2.t ………….. ok
test\recipes\05-test_rc4.t ………….. ok
test\recipes\05-test_rc5.t ………….. skipped: rc5 is not supported by this OpenSSL build
test\recipes\05-test_rmd.t ………….. ok
test\recipes\05-test_sha1.t …………. ok
test\recipes\05-test_sha256.t ……….. ok
test\recipes\05-test_sha512.t ……….. ok
test\recipes\05-test_wp.t …………… ok
test\recipes\10-test_bn.t …………… ok
test\recipes\10-test_exp.t ………….. ok
test\recipes\15-test_dh.t …………… ok
test\recipes\15-test_dsa.t ………….. ok
test\recipes\15-test_ec.t …………… ok
test\recipes\15-test_ecdh.t …………. ok
test\recipes\15-test_ecdsa.t ………… ok
test\recipes\15-test_rsa.t ………….. ok
test\recipes\20-test_enc.t ………….. ok
test\recipes\20-test_passwd.t ……….. ok
test\recipes\25-test_crl.t ………….. ok
test\recipes\25-test_d2i.t ………….. ok
test\recipes\25-test_pkcs7.t ………… ok
test\recipes\25-test_req.t ………….. ok
test\recipes\25-test_sid.t ………….. ok
test\recipes\25-test_verify.t ……….. ok
test\recipes\25-test_x509.t …………. ok
test\recipes\30-test_afalg.t ………… skipped: test_afalg not supported for this build
test\recipes\30-test_engine.t ……….. ok
test\recipes\30-test_evp.t ………….. ok
test\recipes\30-test_evp_extra.t …….. ok
test\recipes\30-test_pbelu.t ………… ok
test\recipes\30-test_pkey_meth.t …….. ok
test\recipes\40-test_rehash.t ……….. skipped: test_rehash is not available on this platform
test\recipes\70-test_asyncio.t ………. ok
test\recipes\70-test_bad_dtls.t ……… ok
test\recipes\70-test_clienthello.t …… ok
test\recipes\70-test_key_share.t …….. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_packet.t ……….. ok
test\recipes\70-test_sslcbcpadding.t …. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslcertstatus.t …. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslextension.t ….. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslrecords.t ……. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslsessiontick.t … skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslskewith0p.t ….. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslversions.t …… skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_sslvertol.t …….. skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_tlsextms.t ……… skipped: TLSProxy isn’t usable on MSWin32
test\recipes\70-test_verify_extra.t ….. ok
test\recipes\70-test_wpacket.t ………. skipped: Only supported in no-shared builds
test\recipes\80-test_ca.t …………… ok
test\recipes\80-test_cipherlist.t ……. ok
test\recipes\80-test_cms.t ………….. ok
test\recipes\80-test_ct.t …………… ok
test\recipes\80-test_dane.t …………. ok
test\recipes\80-test_dtls.t …………. ok
test\recipes\80-test_dtls_mtu.t ……… ok
test\recipes\80-test_dtlsv1listen.t ….. ok
test\recipes\80-test_ocsp.t …………. ok
test\recipes\80-test_pkcs12.t ……….. skipped: Non-Greek system locale
test\recipes\80-test_ssl_new.t ………. ok
test\recipes\80-test_ssl_old.t ………. ok
test\recipes\80-test_ssl_test_ctx.t ….. ok
test\recipes\80-test_sslcorrupt.t ……. ok
test\recipes\80-test_tsa.t ………….. ok
test\recipes\80-test_x509aux.t ………. ok
test\recipes\90-test_async.t ………… ok
test\recipes\90-test_bio_enc.t ………. ok
test\recipes\90-test_bioprint.t ……… ok
test\recipes\90-test_constant_time.t …. ok
test\recipes\90-test_external.t ……… skipped: No external tests have been detected
test\recipes\90-test_fuzz.t …………. ok
test\recipes\90-test_gmdiff.t ……….. ok
test\recipes\90-test_ige.t ………….. ok
test\recipes\90-test_memleak.t ………. ok
test\recipes\90-test_overhead.t ……… skipped: Only supported in no-shared builds
test\recipes\90-test_p5_crpt2.t ……… ok
test\recipes\90-test_secmem.t ……….. ok
test\recipes\90-test_shlibload.t …….. ok
test\recipes\90-test_srp.t ………….. ok
test\recipes\90-test_sslapi.t ……….. ok
test\recipes\90-test_threads.t ………. ok
test\recipes\90-test_tls13secrets.t ….. skipped: tls13secrets is not supported in this build
test\recipes\90-test_v3name.t ……….. ok
All tests successful.
Files=97, Tests=454, 2474 wallclock secs ( 1.59 usr + 0.39 sys = 1.98 CPU)
Result: PASS

执行nmake install 出错
  1. Cannot create directory C:/Program Files (x86)/Common Files/SSL: No such file or directory
    NMAKE : fatal error U1077: “C:\Perl64\bin\perl.exe”: 返回代码“0x2”
    Stop.

    在 C:\rogram Files (x86)\Common Files\SSL下手动新建ssl文件夹

  2. Cannot create directory C:/Program Files (x86)/Common Files/SSL/certs: No such file or directory
    NMAKE : fatal error U1077: “C:\Perl64\bin\perl.exe”: 返回代码“0x2”

    在 C:\rogram Files (x86)\Common Files\SSL\下手动新建certs文件夹

  3. 依然报目录不存在的错误。

    关闭当前命令提示框,在前提准备步骤3中找到对应的命令提示,右键,选择用管理员身份打开,如图所示:

    (其实调用的是D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat,所以用管理员身份运行此程序是一样的效果)

编译成功通过,over

参考:

  1. 如何在Windows下编译OpenSSL?
  2. Win32下VC编译OpenSSl

http://chatgpt.dhexx.cn/article/jlyP7h8O.shtml

相关文章

windows下OpenSSL安装

官网下载地址:https://www.openssl.org/source/ 项目GitHub地址: https://github.com/openssl/openssl 其他下载地址:http://slproweb.com/products/Win32OpenSSL.html https://oomake.com/download/openssl 一、下载openssl安装版 二、修…

OpenSSL安装及查看版本号

1、安装OpenSSL 下载链接 安装按照提示即可 2、添加系统path环境变量 D:\OpenSSL-Win64\OpenSSL-Win64\bin3、查看OpenSSL版本号 openssl version 或者 openssl version -a

openssl安装方式(Ubuntu下)

openssl安装方式 官方网站1、解压2、编译安装3、生成 软连接4、测试 官方网站 https://www.openssl.org/source/ 1、解压 我这里 安装的版本时1.0.2,其实都一样 ,默认版本 是1.1.1 拿到 源码后先解压源码文件 openssl-1.0.2u.tar.gz2、编译安装 进…

Linux查找openssl文件夹,Linux下OpenSSL 安装详解 +图解

安装环境: 操作系统:redhat 12.0 OpenSSL Version:openssl-0.9.8l Download 安装包(Linux source) :openssl-0.9.8l.tar.gz(or the latest version of openssl)下载地址: 在linux下解压缩下载到的安装包,命令如下.....tar -xzf op…

OpenSSL安装升级

官网:/source/index.html 当前(2020-10-22)最新稳定版本:https://www.openssl.org/source/openssl-1.1.1h.tar.gz Note: The latest stable version is the 1.1.1 series. This is also our Long Term Support (LTS) version, supported until 11th Se…

【物联网】Linux平台OpenSSL安装教程

00. 目录 文章目录 00. 目录01. OpenSSL概述02. OpenSSL下载03. OpenSSL安装04. 查看系统OpenSSL版本05. 附录 01. OpenSSL概述 OpenSSL是一个安全套接字层密码库,囊括主要的密码算法、常用密钥、证书封装管理功能及实现ssl协议。OpenSSL整个软件包大概可以分成三个…

OpenSSL安装使用(二):OpenSSL安装说明

注:该方法适用于Openssl 1.1.1及以上版本 1)安装环境:Windows10专业版VS2010 相关软件下载地址: 1)ActivePerl :Download & Install Perl - ActiveState 2)openssl:/source/…

OpenSSL安装

下载OpenSSL压缩包 下载地址 可以直接下载压缩包或者用Git拉取 下载perl 下载地址 下载压缩包,解压,将路径D:\Program\strawberry-perl\perl\bin配置到环境变量path中 打开powershell,输入perl -v 代表安装成功 下载nasm 下载地址 下载…

OpenSSL完整安装教程及部分问题解决

一、环境: 系统:Centos 7 OpenSSL版本:openssl-1.1.1g 二、下载 OpenSSL官方下载网址:https://www.openssl.org/source/ openssl有发行了2.0版本,但此处仅用稳定的1.0版本即可。 官方教程:https://wiki.…

Windows 下OpenSSL安装过程及错误解决办法

Windows下使用OpenSSL有两种方式: 一.直接下载别人编译好的安装包:http://slproweb.com/products/Win32OpenSSL.html 二.自己编译安装: 1.下载并安装perl http://www.activestate.com/activeperl/downloads/ 2.安装与配置: …

openssl安装与使用

1、OpenSSL简介 OpenSSL是一个SSL协议的开源实现,采用C语言作为开发语言,具备了跨平台的能力,支持Unix/Linux、Windows、Mac OS等多种平台。    OpenSSL最早的版本在1995年发布,1998年后开始由OpenSSL项目组维护和开发。当前最新…

windows 下openssl安装配置

一、下载 1、官网下载 /source/index.html(源码版) 2、网盘下载(windows版) 链接:https://pan.baidu.com/s/1JrM_Fg8uHt0O0HEN_w7coA 提取码:7777 3 、码客下载 OpenSSL官方下载 - 码客 …

Openssl安装教程

目录 1、安装相关依赖2、官网下载openssl版本3、编译openssl4、查看openssl版本 1、安装相关依赖 通过yum命令下载相关的依赖包gcc、libffi-devel、zlib*、openssl-devel,当然很多依赖包系统都应该有了; yum install gcc libffi-devel zlib* openssl-d…

降维分析之PCA分析及实现

引言 不知道大家还记不记得前面我们分享 支持向量机(SVM)的分析及python实现时说过,当数据遇到线性不可分时,我们可以利用kernel技巧将低维数据映射到高维数据上,从而使得数据线性可分,这是个“升维”操作。那么本章我…

[R语言] R语言PCA分析教程 Principal Component Methods in R

R语言PCA分析教程 Principal Component Methods in R(代码下载) 主成分分析Principal Component Methods(PCA)允许我们总结和可视化包含由多个相互关联的定量变量描述的个体/观察的数据集中的信息。每个变量都可以视为不同的维度。如果数据集中包含3个以…

R语言对表达谱样本做PCA分析

主成分分析(Principal component analysis, PCA)是一种数学算法,它可以在减少数据维度的同时,保留数据集中绝大多数的变量[1]。 PCA通过对主成分进行辨别,找出一个方向,并沿此方向分布的数据为最大值,从而减少数据维度。通过采用这样的主成分,便可以只选用若干变量而不…

SIMCA-P 11.5 使用教程 PCA分析 PLS-DA分析

软件:SIMCA-P 11.5 数据:一个公共生物数据,195个样本(1类样本48例,2类样本147例),22个特征 二维数据表,csv格式,第一行为类标,第一列为特征编号 1、读取数据文件 (1)"File" -> "New" -> 选择csv数据文件,跳转Text Import Wizard窗口…

GCTA PCA分析以及软件安装教程

软件介绍系列 1. GCTA介绍 在群体遗传中,GCTA中做PCA非常方便, 下面介绍一下GCTA的安装方法. 2. 安装命令 使用conda自动安装 conda install -c biobuilds gcta 手动安装 官方地址 说明文档 3. 安装成功测试 这里, 应该键入gcta64, 而不是gcta (base) [de…

PCA分析法的python主要代码

一 PCA分析法介绍 可以理解为是一种降维的思想,将M列数据降维成对应的N列数据,用主要的几个字段解释整体方差变异 也可以理解为一种低维度的映射,举例将三维的数据找到一个二维映射面,同时可以尽力解释出较多的信息来 举例如下图…

R统计绘图-PCA分析及绘制双坐标轴双序图

zhe 点击名片 关注我们 有师妹来咨询,怎样画类似于上图的双坐标轴PCA双序图。正好之前虽然PCA和RDA分析及绘图都写过教程,但是变量分析结果没有在图中显示,所以使用R统计绘图-环境因子相关性热图流程开始按图1整理环境因子数据,…