Lines Matching refs:pebuf

26 static int pefile_parse_binary(const void *pebuf, unsigned int pelen,  in pefile_parse_binary()  argument
29 const struct mz_hdr *mz = pebuf; in pefile_parse_binary()
52 pe = pebuf + mz->peaddr; in pefile_parse_binary()
58 pe32 = pebuf + cursor; in pefile_parse_binary()
59 pe64 = pebuf + cursor; in pefile_parse_binary()
65 (unsigned long)&pe32->csum - (unsigned long)pebuf; in pefile_parse_binary()
74 (unsigned long)&pe64->csum - (unsigned long)pebuf; in pefile_parse_binary()
94 ddir = pebuf + cursor; in pefile_parse_binary()
98 (unsigned long)&ddir->certs - (unsigned long)pebuf; in pefile_parse_binary()
112 ctx->sig_len, pebuf + ctx->sig_offset); in pefile_parse_binary()
117 ctx->secs = secs = pebuf + cursor; in pefile_parse_binary()
126 static int pefile_strip_sig_wrapper(const void *pebuf, in pefile_strip_sig_wrapper() argument
138 memcpy(&wrapper, pebuf + ctx->sig_offset, sizeof(wrapper)); in pefile_strip_sig_wrapper()
172 pkcs7 = pebuf + ctx->sig_offset; in pefile_strip_sig_wrapper()
245 static int pefile_digest_pe_contents(const void *pebuf, unsigned int pelen, in pefile_digest_pe_contents() argument
255 ret = crypto_shash_update(desc, pebuf, ctx->image_checksum_offset); in pefile_digest_pe_contents()
260 ret = crypto_shash_update(desc, pebuf + tmp, in pefile_digest_pe_contents()
266 ret = crypto_shash_update(desc, pebuf + tmp, ctx->header_size - tmp); in pefile_digest_pe_contents()
296 pebuf + ctx->secs[i].data_addr, in pefile_digest_pe_contents()
309 pebuf + hashed_bytes, in pefile_digest_pe_contents()
322 static int pefile_digest_pe(const void *pebuf, unsigned int pelen, in pefile_digest_pe() argument
362 ret = pefile_digest_pe_contents(pebuf, pelen, ctx, desc); in pefile_digest_pe()
420 int verify_pefile_signature(const void *pebuf, unsigned pelen, in verify_pefile_signature() argument
434 ret = pefile_parse_binary(pebuf, pelen, &ctx); in verify_pefile_signature()
438 ret = pefile_strip_sig_wrapper(pebuf, &ctx); in verify_pefile_signature()
442 pkcs7 = pkcs7_parse_message(pebuf + ctx.sig_offset, ctx.sig_len); in verify_pefile_signature()
464 ret = pefile_digest_pe(pebuf, pelen, &ctx); in verify_pefile_signature()