staging: octeon-usb: add spaces around operator
[linux/fpc-iii.git] / include / keys / system_keyring.h
blob39fd38cfa8c96512e59360f151eebb07eb74be1f
1 /* System keyring containing trusted public keys.
3 * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
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
9 * 2 of the Licence, or (at your option) any later version.
12 #ifndef _KEYS_SYSTEM_KEYRING_H
13 #define _KEYS_SYSTEM_KEYRING_H
15 #ifdef CONFIG_SYSTEM_TRUSTED_KEYRING
17 #include <linux/key.h>
18 #include <crypto/public_key.h>
20 extern struct key *system_trusted_keyring;
21 static inline struct key *get_system_trusted_keyring(void)
23 return system_trusted_keyring;
25 #else
26 static inline struct key *get_system_trusted_keyring(void)
28 return NULL;
30 #endif
32 #ifdef CONFIG_SYSTEM_DATA_VERIFICATION
33 extern int system_verify_data(const void *data, unsigned long len,
34 const void *raw_pkcs7, size_t pkcs7_len,
35 enum key_being_used_for usage);
36 #endif
38 #ifdef CONFIG_IMA_MOK_KEYRING
39 extern struct key *ima_mok_keyring;
40 extern struct key *ima_blacklist_keyring;
42 static inline struct key *get_ima_mok_keyring(void)
44 return ima_mok_keyring;
46 static inline struct key *get_ima_blacklist_keyring(void)
48 return ima_blacklist_keyring;
50 #else
51 static inline struct key *get_ima_mok_keyring(void)
53 return NULL;
55 static inline struct key *get_ima_blacklist_keyring(void)
57 return NULL;
59 #endif /* CONFIG_IMA_MOK_KEYRING */
62 #endif /* _KEYS_SYSTEM_KEYRING_H */