Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmsm库支持对基于1.2.156.10197.1.301 sm2-1数字签名算法的公钥或证书,进行读取和验签操作吗 #169

Open
zhanghouxin07 opened this issue Jul 8, 2022 · 0 comments

Comments

@zhanghouxin07
Copy link

hi,勤劳的开发者们,

请问gmsm库支持对基于1.2.156.10197.1.301 sm2-1数字签名算法的公钥或证书,进行读取和验签操作吗

我获取了一份国密证书,但在加载证书时报错msg为:x509: not sm2 elliptic curve

代码片段为:
pubKey, err := x509.ReadPublicKeyFromPem(content) // 读取公钥
if err != nil || pubKey == nil {
fmt.Println("failed to read cert file, error is", err)
return
}

请问这个功能可用吗,是否有现有可用的函数可以使用,感谢。

best wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant