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

signature fixups #306

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Duncaen
Copy link
Member

@Duncaen Duncaen commented Jul 11, 2020

No description provided.

Duncaen added 5 commits July 11, 2020 16:54
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
Copy link
Member

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())) {
Copy link
Member

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) {
Copy link
Member

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 ?

Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

3 participants