![Thomas Gleixner](/assets/img/avatar_default.png)
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public licence as published by the free software foundation either version 2 of the licence or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 114 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520170857.552531963@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 lines
979 B
C
38 lines
979 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* PE Binary parser bits
|
|
*
|
|
* Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
|
|
* Written by David Howells (dhowells@redhat.com)
|
|
*/
|
|
|
|
#include <crypto/pkcs7.h>
|
|
#include <crypto/hash_info.h>
|
|
|
|
struct pefile_context {
|
|
unsigned header_size;
|
|
unsigned image_checksum_offset;
|
|
unsigned cert_dirent_offset;
|
|
unsigned n_data_dirents;
|
|
unsigned n_sections;
|
|
unsigned certs_size;
|
|
unsigned sig_offset;
|
|
unsigned sig_len;
|
|
const struct section_header *secs;
|
|
|
|
/* PKCS#7 MS Individual Code Signing content */
|
|
const void *digest; /* Digest */
|
|
unsigned digest_len; /* Digest length */
|
|
const char *digest_algo; /* Digest algorithm */
|
|
};
|
|
|
|
#define kenter(FMT, ...) \
|
|
pr_devel("==> %s("FMT")\n", __func__, ##__VA_ARGS__)
|
|
#define kleave(FMT, ...) \
|
|
pr_devel("<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
|
|
|
|
/*
|
|
* mscode_parser.c
|
|
*/
|
|
extern int mscode_parse(void *_ctx, const void *content_data, size_t data_len,
|
|
size_t asn1hdrlen);
|