Lines Matching refs:pebuf

22 static int pefile_parse_binary(const void *pebuf, unsigned int pelen,  in pefile_parse_binary()  argument
25 const struct mz_hdr *mz = pebuf; in pefile_parse_binary()
48 pe = pebuf + mz->peaddr; in pefile_parse_binary()
54 pe32 = pebuf + cursor; in pefile_parse_binary()
55 pe64 = pebuf + cursor; in pefile_parse_binary()
61 (unsigned long)&pe32->csum - (unsigned long)pebuf; in pefile_parse_binary()
70 (unsigned long)&pe64->csum - (unsigned long)pebuf; in pefile_parse_binary()
90 ddir = pebuf + cursor; in pefile_parse_binary()
94 (unsigned long)&ddir->certs - (unsigned long)pebuf; in pefile_parse_binary()
108 ctx->sig_len, pebuf + ctx->sig_offset); in pefile_parse_binary()
113 ctx->secs = secs = pebuf + cursor; in pefile_parse_binary()
122 static int pefile_strip_sig_wrapper(const void *pebuf, in pefile_strip_sig_wrapper() argument
134 memcpy(&wrapper, pebuf + ctx->sig_offset, sizeof(wrapper)); in pefile_strip_sig_wrapper()
168 pkcs7 = pebuf + ctx->sig_offset; in pefile_strip_sig_wrapper()
241 static int pefile_digest_pe_contents(const void *pebuf, unsigned int pelen, in pefile_digest_pe_contents() argument
251 ret = crypto_shash_update(desc, pebuf, ctx->image_checksum_offset); in pefile_digest_pe_contents()
256 ret = crypto_shash_update(desc, pebuf + tmp, in pefile_digest_pe_contents()
262 ret = crypto_shash_update(desc, pebuf + tmp, ctx->header_size - tmp); in pefile_digest_pe_contents()
292 pebuf + ctx->secs[i].data_addr, in pefile_digest_pe_contents()
305 pebuf + hashed_bytes, in pefile_digest_pe_contents()
318 static int pefile_digest_pe(const void *pebuf, unsigned int pelen, in pefile_digest_pe() argument
357 ret = pefile_digest_pe_contents(pebuf, pelen, ctx, desc); in pefile_digest_pe()
416 int verify_pefile_signature(const void *pebuf, unsigned pelen, in verify_pefile_signature() argument
426 ret = pefile_parse_binary(pebuf, pelen, &ctx); in verify_pefile_signature()
430 ret = pefile_strip_sig_wrapper(pebuf, &ctx); in verify_pefile_signature()
435 pebuf + ctx.sig_offset, ctx.sig_len, in verify_pefile_signature()
447 ret = pefile_digest_pe(pebuf, pelen, &ctx); in verify_pefile_signature()