国密库崩溃的BUG

## About GmSSL
#LINUX 下编译 -d代表编译debug版本
./config  no-shared -d
make
make  install

生成私钥
gmssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:sm2p256v1 -pkeyopt ec_param_enc:named_curve -out gm_privatekey.pem

生成证书
gmssl req -new -x509 -key gm_privatekey.pem -out gm_cert.pem

#编译静态库增加参数 no-shared  
#perl选择开源的 Strawberry , 不能选择商业版的 ActivePerl

使用VS的Native Tools Command Prompt 提示符控制台执行下面的命令进行编译:

否则会报错:

openssl-1.1.1g\e_os.h(13): fatal error C1083: 无法打开包括文件: “limits.h”: No such file or directory

#Windows下32位编译
perl Configure  VC-WIN32  no-shared
nmake

#Windows下64位编译
perl Configure  VC-WIN64A  no-shared
nmake
 

如果执行  perl Configure VC-WIN64A no-shared, 报错:
"glob" is not exported by the File::Glob module
Can't continue after import errors at Configure line 18.
BEGIN failed--compilation aborted at Configure line 18.

解决办法:

1、修改test/build.info文件的339行:

   use File::Spec::Functions;
   use File::Basename;
   #use if $^O ne "VMS", 'File::Glob' => qw/glob/;  去掉这行
   use File::Glob ':glob';  增加这行

2、修改Configure文件的第18行:

require 5.10.0;
use strict;
use File::Basename;
use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
use File::Path qw/mkpath/;
#use if $^O ne "VMS", 'File::Glob' => qw/glob/;  去掉这行
use File::Glob ':glob';  增加这行

然后下来执行   nmake 即可。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

langeldep

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值