History

PKCS#7: Refactor verify_pkcs7_signature()

IMA will need to verify a PKCS#7 signature which has already been parsed. For this reason, factor out the code which does that from verify_pkcs7_signature() into a new function which takes a struct pkcs7_message instead of a data buffer.

Thiago Jung Bauermann committed 7 years ago

Commit 2a7bf671 parent c8424e72 files · +55 −16Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/verification.h+10−0
@@ -32,6 +32,7 @@ extern const char *const key_being_used_for[NR__KEY_BEING_USED_FOR]; · 31 unmodified lines
32#ifdef CONFIG_SYSTEM_DATA_VERIFICATION32#ifdef CONFIG_SYSTEM_DATA_VERIFICATION
33 33
34struct key;34struct key;
35struct pkcs7_message;
35 36
36extern int verify_pkcs7_signature(const void *data, size_t len,37extern int verify_pkcs7_signature(const void *data, size_t len,
37 const void *raw_pkcs7, size_t pkcs7_len,38 const void *raw_pkcs7, size_t pkcs7_len,
@@ -41,6 +42,15 @@ extern int verify_pkcs7_signature(const void *data, size_t len, · 3 unmodified lines
41 const void *data, size_t len,42 const void *data, size_t len,
42 size_t asn1hdrlen),43 size_t asn1hdrlen),
43 void *ctx);44 void *ctx);
45extern int verify_pkcs7_message_sig(const void *data, size_t len,
46 struct pkcs7_message *pkcs7,
47 struct key *trusted_keys,
48 enum key_being_used_for usage,
49 int (*view_content)(void *ctx,
50 const void *data,
51 size_t len,
52 size_t asn1hdrlen),
53 void *ctx);
44 54
45#ifdef CONFIG_SIGNED_PE_FILE_VERIFICATION55#ifdef CONFIG_SIGNED_PE_FILE_VERIFICATION
46extern int verify_pefile_signature(const void *pebuf, unsigned pelen,56extern int verify_pefile_signature(const void *pebuf, unsigned pelen,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t