hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/include/keys/asymmetric-subtype.h
....@@ -1,14 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* Asymmetric public-key cryptography key subtype
23 *
3
- * See Documentation/crypto/asymmetric-keys.txt
4
+ * See Documentation/crypto/asymmetric-keys.rst
45 *
56 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
67 * Written by David Howells (dhowells@redhat.com)
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public Licence
10
- * as published by the Free Software Foundation; either version
11
- * 2 of the Licence, or (at your option) any later version.
128 */
139
1410 #ifndef _KEYS_ASYMMETRIC_SUBTYPE_H
....@@ -17,6 +13,8 @@
1713 #include <linux/seq_file.h>
1814 #include <keys/asymmetric-type.h>
1915
16
+struct kernel_pkey_query;
17
+struct kernel_pkey_params;
2018 struct public_key_signature;
2119
2220 /*
....@@ -34,6 +32,13 @@
3432 /* Destroy a key of this subtype */
3533 void (*destroy)(void *payload_crypto, void *payload_auth);
3634
35
+ int (*query)(const struct kernel_pkey_params *params,
36
+ struct kernel_pkey_query *info);
37
+
38
+ /* Encrypt/decrypt/sign data */
39
+ int (*eds_op)(struct kernel_pkey_params *params,
40
+ const void *in, void *out);
41
+
3742 /* Verify the signature on a key of this subtype (optional) */
3843 int (*verify_signature)(const struct key *key,
3944 const struct public_key_signature *sig);