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
3232 #ifdef CONFIG_SYSTEM_DATA_VERIFICATION
3333
3434 struct key;
35+struct pkcs7_message;
3536
3637 extern int verify_pkcs7_signature(const void *data, size_t len,
3738 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
4142 const void *data, size_t len,
4243 size_t asn1hdrlen),
4344 void *ctx);
45+extern 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);
4454
4555 #ifdef CONFIG_SIGNED_PE_FILE_VERIFICATION
4656 extern 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