GmSSL icon indicating copy to clipboard operation
GmSSL copied to clipboard

无法进行SM2签名,提示pkeyutl: Can't set parameter:

Open hrimfaxi opened this issue 9 years ago • 3 comments

操作系统:Ubuntu 16.04 最新commit(4d60905e044029d36f8ed02d5c838722d1346319)

0、生成test.file文件 echo "Hello world" > test.file 1、生成签名私钥 gmssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:sm2p256v1 -pkeyopt ec_param_enc:named_curve -out signkey.pem 2、对test.file进行签名 gmssl pkeyutl -sign -inkey signkey.pem -pkeyopt ec_sign_algor:sm2 -in test.file -out test_sign.sig

hrimfaxi@ubuntu-build-server:~/GmSSL$ gmssl version
GmSSL 2.0 - OpenSSL 1.1.0d  26 Jan 2017
hrimfaxi@ubuntu-build-server:~/GmSSL$  echo "Hello world" > test.file
hrimfaxi@ubuntu-build-server:~/GmSSL$ gmssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:sm2p256v1 -pkeyopt ec_param_enc:named_curve -out signkey.pem
Using configuration from /usr/local/ssl/openssl.cnf
hrimfaxi@ubuntu-build-server:~/GmSSL$ gmssl pkeyutl -sign -inkey signkey.pem -pkeyopt ec_sign_algor:sm2 -in test.file -out test_sign.sig
Using configuration from /usr/local/ssl/openssl.cnf
pkeyutl: Can't set parameter:

hrimfaxi avatar Nov 16 '17 09:11 hrimfaxi

是ec_sign_algor改名为了ec_scheme吗?如果是请更新文档

hrimfaxi avatar Nov 16 '17 09:11 hrimfaxi

我们会对这个问题进行修改,以保持和1.x版本的兼容性。

guanzhi avatar Nov 25 '17 08:11 guanzhi

我也遇到这个问题. 软件版本:GmSSL 2.1.1 - OpenSSL 1.1.0d 26 Jan 2018 运行环境:CentOS 7.3 X64

参考: 【GmSSL 快速上手】 http://gmssl.org/docs/quickstart.html

daiziyi avatar Feb 26 '18 06:02 daiziyi