diff options
author | David Howells <dhowells@redhat.com> | 2016-04-06 17:14:24 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-04-06 17:14:24 +0200 |
commit | e68503bd6836ba765dc8e0ee77ea675fedc07e41 (patch) | |
tree | 31ebec81d2f52adc89796dd063468235bfd1cc0e /include/keys | |
parent | X.509: Fix self-signed determination (diff) | |
download | linux-e68503bd6836ba765dc8e0ee77ea675fedc07e41.tar.xz linux-e68503bd6836ba765dc8e0ee77ea675fedc07e41.zip |
KEYS: Generalise system_verify_data() to provide access to internal content
Generalise system_verify_data() to provide access to internal content
through a callback. This allows all the PKCS#7 stuff to be hidden inside
this function and removed from the PE file parser and the PKCS#7 test key.
If external content is not required, NULL should be passed as data to the
function. If the callback is not required, that can be set to NULL.
The function is now called verify_pkcs7_signature() to contrast with
verify_pefile_signature() and the definitions of both have been moved into
linux/verification.h along with the key_being_used_for enum.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/keys')
-rw-r--r-- | include/keys/asymmetric-type.h | 1 | ||||
-rw-r--r-- | include/keys/system_keyring.h | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/include/keys/asymmetric-type.h b/include/keys/asymmetric-type.h index 70a8775bb444..d1e23dda4363 100644 --- a/include/keys/asymmetric-type.h +++ b/include/keys/asymmetric-type.h @@ -15,6 +15,7 @@ #define _KEYS_ASYMMETRIC_TYPE_H #include <linux/key-type.h> +#include <linux/verification.h> extern struct key_type key_type_asymmetric; diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h index 39fd38cfa8c9..b2d645ac35a0 100644 --- a/include/keys/system_keyring.h +++ b/include/keys/system_keyring.h @@ -15,6 +15,7 @@ #ifdef CONFIG_SYSTEM_TRUSTED_KEYRING #include <linux/key.h> +#include <linux/verification.h> #include <crypto/public_key.h> extern struct key *system_trusted_keyring; @@ -29,12 +30,6 @@ static inline struct key *get_system_trusted_keyring(void) } #endif -#ifdef CONFIG_SYSTEM_DATA_VERIFICATION -extern int system_verify_data(const void *data, unsigned long len, - const void *raw_pkcs7, size_t pkcs7_len, - enum key_being_used_for usage); -#endif - #ifdef CONFIG_IMA_MOK_KEYRING extern struct key *ima_mok_keyring; extern struct key *ima_blacklist_keyring; |