system_keyring.h (f26e8817b235d8764363bffcc9cbfc61867371f2) system_keyring.h (734114f8782f6c3398762f2353fe9101d87b6d06)
1/* System keyring containing trusted public keys.
2 *
3 * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version

--- 19 unchanged lines hidden (view full) ---

28extern int restrict_link_by_builtin_and_secondary_trusted(
29 struct key *keyring,
30 const struct key_type *type,
31 const union key_payload *payload);
32#else
33#define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted
34#endif
35
1/* System keyring containing trusted public keys.
2 *
3 * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version

--- 19 unchanged lines hidden (view full) ---

28extern int restrict_link_by_builtin_and_secondary_trusted(
29 struct key *keyring,
30 const struct key_type *type,
31 const union key_payload *payload);
32#else
33#define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted
34#endif
35
36#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
37extern int mark_hash_blacklisted(const char *hash);
38extern int is_hash_blacklisted(const u8 *hash, size_t hash_len,
39 const char *type);
40#else
41static inline int is_hash_blacklisted(const u8 *hash, size_t hash_len,
42 const char *type)
43{
44 return 0;
45}
46#endif
47
36#ifdef CONFIG_IMA_BLACKLIST_KEYRING
37extern struct key *ima_blacklist_keyring;
38
39static inline struct key *get_ima_blacklist_keyring(void)
40{
41 return ima_blacklist_keyring;
42}
43#else
44static inline struct key *get_ima_blacklist_keyring(void)
45{
46 return NULL;
47}
48#endif /* CONFIG_IMA_BLACKLIST_KEYRING */
49
50
51#endif /* _KEYS_SYSTEM_KEYRING_H */
48#ifdef CONFIG_IMA_BLACKLIST_KEYRING
49extern struct key *ima_blacklist_keyring;
50
51static inline struct key *get_ima_blacklist_keyring(void)
52{
53 return ima_blacklist_keyring;
54}
55#else
56static inline struct key *get_ima_blacklist_keyring(void)
57{
58 return NULL;
59}
60#endif /* CONFIG_IMA_BLACKLIST_KEYRING */
61
62
63#endif /* _KEYS_SYSTEM_KEYRING_H */