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

large file support #42

Open
adrelanos opened this issue Jul 25, 2023 · 3 comments
Open

large file support #42

adrelanos opened this issue Jul 25, 2023 · 3 comments
Assignees

Comments

@adrelanos
Copy link

Created a 2G file for test purposes.

fallocate -l 2G test.img

Tried to sign it.

signify-openbsd -S -s ./keyname.sec -m ./test.img -x ./test.img.sig

result:

signify-openbsd: msg too large in ./test.img

Could you please add support for signing arbitrarily large files?

@aperezdc aperezdc added the bug label Aug 22, 2023
@aperezdc aperezdc self-assigned this Aug 22, 2023
@aperezdc
Copy link
Owner

I think this is a matter of adding -D_LARGEFILE_SOURCE to the preprocessor flags used during compilation, I'll take a look.

@aperezdc
Copy link
Owner

Ah, not really, this is an upstream bug, the maximum size is hardcoded as 1 GiB, see the definition of maxmsgsize inside signify.c:

	const unsigned long long maxmsgsize = 1UL << 30;

	fd = xopen(filename, O_RDONLY | O_NOFOLLOW, 0);
	if (fstat(fd, &sb) == 0 && S_ISREG(sb.st_mode)) {
		if (sb.st_size > maxmsgsize)
			errx(1, "msg too large in %s", filename);
		space = sb.st_size + 1;
	} else {
		space = 64 * 1024 - 1;
	}

@adrelanos
Copy link
Author

Also reported this upstream by e-mail. Here is my e-mails and the replies:
https://forums.whonix.org/t/signify-openbsd/7842/8

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

No branches or pull requests

2 participants