Lines Matching defs:pebuf
22 static int pefile_parse_binary(const void *pebuf, unsigned int pelen,
25 const struct mz_hdr *mz = pebuf;
48 pe = pebuf + mz->peaddr;
54 pe32 = pebuf + cursor;
55 pe64 = pebuf + cursor;
61 (unsigned long)&pe32->csum - (unsigned long)pebuf;
70 (unsigned long)&pe64->csum - (unsigned long)pebuf;
90 ddir = pebuf + cursor;
94 (unsigned long)&ddir->certs - (unsigned long)pebuf;
108 ctx->sig_len, pebuf + ctx->sig_offset);
113 ctx->secs = pebuf + cursor;
122 static int pefile_strip_sig_wrapper(const void *pebuf,
134 memcpy(&wrapper, pebuf + ctx->sig_offset, sizeof(wrapper));
172 pkcs7 = pebuf + ctx->sig_offset;
245 static int pefile_digest_pe_contents(const void *pebuf, unsigned int pelen,
255 ret = crypto_shash_update(desc, pebuf, ctx->image_checksum_offset);
260 ret = crypto_shash_update(desc, pebuf + tmp,
266 ret = crypto_shash_update(desc, pebuf + tmp, ctx->header_size - tmp);
296 pebuf + ctx->secs[i].data_addr,
309 pebuf + hashed_bytes,
322 static int pefile_digest_pe(const void *pebuf, unsigned int pelen,
361 ret = pefile_digest_pe_contents(pebuf, pelen, ctx, desc);
392 * @pebuf: Buffer containing the PE binary image
420 int verify_pefile_signature(const void *pebuf, unsigned pelen,
430 ret = pefile_parse_binary(pebuf, pelen, &ctx);
434 ret = pefile_strip_sig_wrapper(pebuf, &ctx);
439 pebuf + ctx.sig_offset, ctx.sig_len,
451 ret = pefile_digest_pe(pebuf, pelen, &ctx);