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

Content of keystore.der generated by kengen is not correct #291

Closed
ydengxue opened this issue Mar 19, 2023 · 2 comments
Closed

Content of keystore.der generated by kengen is not correct #291

ydengxue opened this issue Mar 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ydengxue
Copy link

The following line in the function "keystore_add" of tools/keytools/keygen.c does not seem to be correct:
fwrite(&sl, sl.pubkey_size, 1, fpub_image);

It should be:
"fwrite(sl.pubkey, sl.pubkey_size, 1, fpub_image);"
or
"fwrite(&sl, sizeof(sl)-KEYSLOT_MAX_PUBKEY_SIZE+sl.pubkey_size, 1, fpub_image);".
Right?

@danielinux danielinux self-assigned this Mar 19, 2023
@danielinux danielinux added the bug Something isn't working label Mar 19, 2023
@danielinux
Copy link
Member

Hi @ydengxue - Thanks for noticing this. The second case is the correct one, I'm going to commit a fix.

@danielinux
Copy link
Member

Closed by #292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants