diff options
Diffstat (limited to 'include/keys')
| -rw-r--r-- | include/keys/big_key-type.h | 25 | ||||
| -rw-r--r-- | include/keys/keyring-type.h | 17 | ||||
| -rw-r--r-- | include/keys/system_keyring.h | 23 |
3 files changed, 50 insertions, 15 deletions
diff --git a/include/keys/big_key-type.h b/include/keys/big_key-type.h new file mode 100644 index 000000000000..d69bc8af3292 --- /dev/null +++ b/include/keys/big_key-type.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* Big capacity key type. | ||
| 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 License | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the License, or (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _KEYS_BIG_KEY_TYPE_H | ||
| 13 | #define _KEYS_BIG_KEY_TYPE_H | ||
| 14 | |||
| 15 | #include <linux/key-type.h> | ||
| 16 | |||
| 17 | extern struct key_type key_type_big_key; | ||
| 18 | |||
| 19 | extern int big_key_instantiate(struct key *key, struct key_preparsed_payload *prep); | ||
| 20 | extern void big_key_revoke(struct key *key); | ||
| 21 | extern void big_key_destroy(struct key *key); | ||
| 22 | extern void big_key_describe(const struct key *big_key, struct seq_file *m); | ||
| 23 | extern long big_key_read(const struct key *key, char __user *buffer, size_t buflen); | ||
| 24 | |||
| 25 | #endif /* _KEYS_BIG_KEY_TYPE_H */ | ||
diff --git a/include/keys/keyring-type.h b/include/keys/keyring-type.h index cf49159b0e3a..fca5c62340a4 100644 --- a/include/keys/keyring-type.h +++ b/include/keys/keyring-type.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Keyring key type | 1 | /* Keyring key type |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2008, 2013 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
| @@ -13,19 +13,6 @@ | |||
| 13 | #define _KEYS_KEYRING_TYPE_H | 13 | #define _KEYS_KEYRING_TYPE_H |
| 14 | 14 | ||
| 15 | #include <linux/key.h> | 15 | #include <linux/key.h> |
| 16 | #include <linux/rcupdate.h> | 16 | #include <linux/assoc_array.h> |
| 17 | |||
| 18 | /* | ||
| 19 | * the keyring payload contains a list of the keys to which the keyring is | ||
| 20 | * subscribed | ||
| 21 | */ | ||
| 22 | struct keyring_list { | ||
| 23 | struct rcu_head rcu; /* RCU deletion hook */ | ||
| 24 | unsigned short maxkeys; /* max keys this list can hold */ | ||
| 25 | unsigned short nkeys; /* number of keys currently held */ | ||
| 26 | unsigned short delkey; /* key to be unlinked by RCU */ | ||
| 27 | struct key __rcu *keys[0]; | ||
| 28 | }; | ||
| 29 | |||
| 30 | 17 | ||
| 31 | #endif /* _KEYS_KEYRING_TYPE_H */ | 18 | #endif /* _KEYS_KEYRING_TYPE_H */ |
diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h new file mode 100644 index 000000000000..8dabc399bd1d --- /dev/null +++ b/include/keys/system_keyring.h | |||
| @@ -0,0 +1,23 @@ | |||
| 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; | ||
| 20 | |||
| 21 | #endif | ||
| 22 | |||
| 23 | #endif /* _KEYS_SYSTEM_KEYRING_H */ | ||
