-
Notifications
You must be signed in to change notification settings - Fork 125
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
signature fixups #306
base: master
Are you sure you want to change the base?
signature fixups #306
Conversation
This function should be used when verifying packages as it will improve performance by keeping the public key in memory instead of reading it for each file that has to be verified.
… to fetch packages This will avoid downloading packages if the repository is not signed or the public key is corrupt or not imported. Closes void-linux#298
There is no point in mmaping 512 byte files and is probably hurting performance.
} | ||
|
||
/* | ||
* Download binary package and signature if either one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enqueue downloading?
* of them don't exist. | ||
*/ | ||
if (!xbps_remote_binpkg_exists(xhp, obj)) { | ||
if (!fetch && !(fetch = xbps_array_create())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Average transaction do fetch package, just creating array on top will be not only more readable, but also faster.
|
||
return val; | ||
rd = read(fd, buf, sizeof buf); | ||
if (rd == -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rd != sizeof buf
, and errno ? errno : EIO
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess sigfile
is required to have a size of 512
bytes, right?
It would be good if this could be a #define
somewhere, and documented in comments. And I would just use rd != SIGFILE_SIZE
, then.
No description provided.