drm/panfrost: Remove set but not used variable 'bo'
[linux/fpc-iii.git] / include / keys / system_keyring.h
blobfb8b07daa9d15519370e1731b8cf4c726bf83a17
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* System keyring containing trusted public keys.
4 * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
8 #ifndef _KEYS_SYSTEM_KEYRING_H
9 #define _KEYS_SYSTEM_KEYRING_H
11 #include <linux/key.h>
13 #ifdef CONFIG_SYSTEM_TRUSTED_KEYRING
15 extern int restrict_link_by_builtin_trusted(struct key *keyring,
16 const struct key_type *type,
17 const union key_payload *payload,
18 struct key *restriction_key);
20 #else
21 #define restrict_link_by_builtin_trusted restrict_link_reject
22 #endif
24 #ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
25 extern int restrict_link_by_builtin_and_secondary_trusted(
26 struct key *keyring,
27 const struct key_type *type,
28 const union key_payload *payload,
29 struct key *restriction_key);
30 #else
31 #define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted
32 #endif
34 #ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
35 extern int mark_hash_blacklisted(const char *hash);
36 extern int is_hash_blacklisted(const u8 *hash, size_t hash_len,
37 const char *type);
38 extern int is_binary_blacklisted(const u8 *hash, size_t hash_len);
39 #else
40 static inline int is_hash_blacklisted(const u8 *hash, size_t hash_len,
41 const char *type)
43 return 0;
46 static inline int is_binary_blacklisted(const u8 *hash, size_t hash_len)
48 return 0;
50 #endif
52 #ifdef CONFIG_IMA_BLACKLIST_KEYRING
53 extern struct key *ima_blacklist_keyring;
55 static inline struct key *get_ima_blacklist_keyring(void)
57 return ima_blacklist_keyring;
59 #else
60 static inline struct key *get_ima_blacklist_keyring(void)
62 return NULL;
64 #endif /* CONFIG_IMA_BLACKLIST_KEYRING */
66 #if defined(CONFIG_INTEGRITY_PLATFORM_KEYRING) && \
67 defined(CONFIG_SYSTEM_TRUSTED_KEYRING)
68 extern void __init set_platform_trusted_keys(struct key *keyring);
69 #else
70 static inline void set_platform_trusted_keys(struct key *keyring)
73 #endif
75 #endif /* _KEYS_SYSTEM_KEYRING_H */