## 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
#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 即可。