-
Notifications
You must be signed in to change notification settings - Fork 10
Description
GO version: 1.21.6
GmSSL version: 1.3.1
GmSSL Library version: 3.1.1
调用 gmssl.ImportSm2EncryptedPrivateKeyInfoPem 载入加密私钥时,panic
Exception 0xc0000005 0x1 0x24 0x7ffe12b03aca
PC=0x7ffe12b03aca
signal arrived during external code execution
runtime.cgocall(0x1b6b92, 0xc00007bdc8)
C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc00007bda0 sp=0xc00007bd68 pc=0x13467e
github.com/GmSSL/GmSSL-Go._Cfunc_sm2_private_key_info_decrypt_from_pem(0xc000010230, 0x15f3b6816a0, 0x7ffe129c8a90)
_cgo_gotypes.go:553 +0x55 fp=0xc00007bdc8 sp=0xc00007bda0 pc=0x1b54f5
github.com/GmSSL/GmSSL-Go.ImportSm2EncryptedPrivateKeyInfoPem.func4(0xc000010230, 0x15f3b6816e0?, 0x7ffe129c8a90?)
C:/Users/froze/go/pkg/mod/github.com/!gm!s!s!l/!gm!s!s!l-!go@v1.3.1/sm2.go:70 +0x54 fp=0xc00007be08 sp=0xc00007bdc8 pc=0x1b5994
github.com/GmSSL/GmSSL-Go.ImportSm2EncryptedPrivateKeyInfoPem({0x1e3993?, 0x189a05?}, {0x1e37b3, 0x8})
另外,windows下所有涉及密钥导入导出到pem的函数,均会panic,相同代码,linux环境无此问题