static int run_gpg_verify(const char *buf, unsigned long size, unsigned flags)
{
struct signature_check sigc;
- int len;
+ size_t payload_size;
int ret;
memset(&sigc, 0, sizeof(sigc));
- len = parse_signature(buf, size);
+ payload_size = parse_signature(buf, size);
- if (size == len) {
+ if (size == payload_size) {
if (flags & GPG_VERIFY_VERBOSE)
- write_in_full(1, buf, len);
+ write_in_full(1, buf, payload_size);
return error("no signature found");
}
- ret = check_signature(buf, len, buf + len, size - len, &sigc);
+ ret = check_signature(buf, payload_size, buf + payload_size,
+ size - payload_size, &sigc);
print_signature_buffer(&sigc, flags);
signature_check_clear(&sigc);