David Howells | b56e5a1 | 2013-08-30 16:07:30 +0100 | [diff] [blame] | 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 |
| 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #ifndef _KEYS_SYSTEM_KEYRING_H |
| 13 | #define _KEYS_SYSTEM_KEYRING_H |
| 14 | |
| 15 | #ifdef CONFIG_SYSTEM_TRUSTED_KEYRING |
| 16 | |
| 17 | #include <linux/key.h> |
| 18 | |
| 19 | extern struct key *system_trusted_keyring; |
Mimi Zohar | 3be4bea | 2013-08-20 14:36:27 -0400 | [diff] [blame] | 20 | static inline struct key *get_system_trusted_keyring(void) |
| 21 | { |
| 22 | return system_trusted_keyring; |
| 23 | } |
| 24 | #else |
| 25 | static inline struct key *get_system_trusted_keyring(void) |
| 26 | { |
| 27 | return NULL; |
| 28 | } |
David Howells | b56e5a1 | 2013-08-30 16:07:30 +0100 | [diff] [blame] | 29 | #endif |
| 30 | |
David Howells | 091f6e2 | 2015-07-20 21:16:28 +0100 | [diff] [blame^] | 31 | #ifdef CONFIG_SYSTEM_DATA_VERIFICATION |
| 32 | extern int system_verify_data(const void *data, unsigned long len, |
| 33 | const void *raw_pkcs7, size_t pkcs7_len); |
| 34 | #endif |
| 35 | |
David Howells | b56e5a1 | 2013-08-30 16:07:30 +0100 | [diff] [blame] | 36 | #endif /* _KEYS_SYSTEM_KEYRING_H */ |