hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/key-type.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* Definitions for key type implementations
23 *
34 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
45 * 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.
106 */
117
128 #ifndef _LINUX_KEY_TYPE_H
....@@ -14,8 +10,12 @@
1410
1511 #include <linux/key.h>
1612 #include <linux/errno.h>
13
+#include <linux/android_kabi.h>
1714
1815 #ifdef CONFIG_KEYS
16
+
17
+struct kernel_pkey_query;
18
+struct kernel_pkey_params;
1919
2020 /*
2121 * Pre-parsed payload, used by key add, update and instantiate.
....@@ -70,6 +70,9 @@
7070 * function only needs to be called if the real datalen is different
7171 */
7272 size_t def_datalen;
73
+
74
+ unsigned int flags;
75
+#define KEY_TYPE_NET_DOMAIN 0x00000001 /* Keys of this type have a net namespace domain */
7376
7477 /* vet a description */
7578 int (*vet_description)(const char *description);
....@@ -145,6 +148,17 @@
145148 */
146149 struct key_restriction *(*lookup_restriction)(const char *params);
147150
151
+ /* Asymmetric key accessor functions. */
152
+ int (*asym_query)(const struct kernel_pkey_params *params,
153
+ struct kernel_pkey_query *info);
154
+ int (*asym_eds_op)(struct kernel_pkey_params *params,
155
+ const void *in, void *out);
156
+ int (*asym_verify_signature)(struct kernel_pkey_params *params,
157
+ const void *in, const void *in2);
158
+
159
+ ANDROID_KABI_RESERVE(1);
160
+ ANDROID_KABI_RESERVE(2);
161
+
148162 /* internal fields */
149163 struct list_head link; /* link in types list */
150164 struct lock_class_key lock_class; /* key->sem lock class */