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

feat: SM2Util 支持通过密钥对和证书的字符串形式加载其对象 #82

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

photowey
Copy link
Contributor

@photowey photowey commented Dec 2, 2023

  • 新增: SM2Util#loadPrivFromString;
  • 新增: SM2Util#loadPublicFromString;
  • 新增: SM2Util#loadX509CertificateFromString;
  • 新增: 以上三方法对应的测试用例;

@SamYuan1990
Copy link
Member

首先 我们启用了DCO检测,请依据DCO检测的提示修改提交的信息。
其次 如果加这一层,那么,先有函数应该复用read from string这个函数。
第三 对于build.gradle的修改要以ci运行结果为准。

Copy link
Member

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comments.

@Test
public void testLoadPrivFromString() throws Exception {
InputStream in = SM2UtilTest.class.getResourceAsStream("testdata.yml");
Map<String, Map<String, Object>> configMap = ConfigLoader.loadConfig(in);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完全可以弄一个全局变量吧?没必要copy paste yourself

@SamYuan1990
Copy link
Member

@ryjones or @davidkhala , could you please help check our CI. It seems just DCO is running.

@ryjones
Copy link
Contributor

ryjones commented Dec 4, 2023

it was disabled by github as it has not run in over 90 days. I've re-enabled it. @SamYuan1990 it should run on the next push to the PR

@SamYuan1990
Copy link
Member

it was disabled by github as it has not run in over 90 days. I've re-enabled it. @SamYuan1990 it should run on the next push to the PR

thanks @ryjones , @photowey , could you please make a dummy commit so that we can trigger CI?

@photowey
Copy link
Contributor Author

photowey commented Dec 7, 2023

OK

Signed-off-by: photowey <photowey@gmail.com>
Signed-off-by: photowey <photowey@gmail.com>
Signed-off-by: photowey <photowey@gmail.com>
Copy link
Member

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SamYuan1990
Copy link
Member

update PR description and merge.

@SamYuan1990 SamYuan1990 merged commit 1fe8186 into Hyperledger-TWGC:master Dec 9, 2023
2 checks passed
@SamYuan1990
Copy link
Member

@photowey thanks for your contribute.

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

Successfully merging this pull request may close these issues.

None yet

3 participants