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

EC_GROUP_new_by_curve_name(); // 椭圆曲线 方法返回NULL #82

Open
dsq911010 opened this issue Jul 31, 2023 · 2 comments
Open

EC_GROUP_new_by_curve_name(); // 椭圆曲线 方法返回NULL #82

dsq911010 opened this issue Jul 31, 2023 · 2 comments

Comments

@dsq911010
Copy link

dsq911010 commented Jul 31, 2023

设置NID_sm2默认加密方式后,生成的group返回NULL

@dsq911010 dsq911010 changed the title EC_GROUP *group = EC_GROUP_new_by_curve_name(kDefaultEllipticCurveType); // 椭圆曲线 EC_GROUP_new_by_curve_name(); // 椭圆曲线 方法返回NULL Jul 31, 2023
@muzipiao
Copy link
Owner

muzipiao commented Aug 1, 2023

大概率是项目中存在多个 OpenSSL,且 link 在前的 OpenSSL 为较旧版本。
解决方法:

  1. 方法1,排查删除较旧的 OpenSSL,统一为较新的 OpenSSL 库;
  2. 方法2,更改静态库编译顺序,将新版本 OpenSSL 排在前面;
  3. 方法3,将 GMObjC 编译为动态库,不用再 link OpenSSL 库。

@shengxiaolei
Copy link

请问下方法3具体怎么做呢

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

3 participants