summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/verify_pefile.h
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-07-24 21:36:19 +1000
committerJames Morris <james.l.morris@oracle.com>2014-07-24 21:36:19 +1000
commit4ca332e11df42604e784bd7da9e483160636d05e (patch)
tree82e6ba6dff978edc2132e751c19197de50218c7e /crypto/asymmetric_keys/verify_pefile.h
parent6d6f3328422a3bc56b0d8dd026a5de845d2abfa7 (diff)
parent633706a2ee81637be37b6bc02c5336950cc163b5 (diff)
downloadop-kernel-dev-4ca332e11df42604e784bd7da9e483160636d05e.zip
op-kernel-dev-4ca332e11df42604e784bd7da9e483160636d05e.tar.gz
Merge tag 'keys-next-20140722' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
Diffstat (limited to 'crypto/asymmetric_keys/verify_pefile.h')
-rw-r--r--crypto/asymmetric_keys/verify_pefile.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/verify_pefile.h b/crypto/asymmetric_keys/verify_pefile.h
new file mode 100644
index 0000000..55d5f7e
--- /dev/null
+++ b/crypto/asymmetric_keys/verify_pefile.h
@@ -0,0 +1,42 @@
+/* PE Binary parser bits
+ *
+ * Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#include <linux/verify_pefile.h>
+#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;
+ struct pkcs7_message *pkcs7;
+
+ /* PKCS#7 MS Individual Code Signing content */
+ const void *digest; /* Digest */
+ unsigned digest_len; /* Digest length */
+ enum hash_algo 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(struct pefile_context *ctx);
OpenPOWER on IntegriCloud