sha512_init(&sha512_ctx);
sha512_update(&sha512_ctx, p, hdr->len - hdr_size(hdr));
if (memcmp(vh->sha512, sha512_ctx.buf, sizeof(sha512))) {
log_err("sha512: verify failed at %llu/%u\n",
sha512_init(&sha512_ctx);
sha512_update(&sha512_ctx, p, hdr->len - hdr_size(hdr));
if (memcmp(vh->sha512, sha512_ctx.buf, sizeof(sha512))) {
log_err("sha512: verify failed at %llu/%u\n",