1
2
3
4
5
6
7
8
9
10 #ifndef _KEYS_ASYMMETRIC_SUBTYPE_H
11 #define _KEYS_ASYMMETRIC_SUBTYPE_H
12
13 #include <linux/seq_file.h>
14 #include <keys/asymmetric-type.h>
15
16 struct kernel_pkey_query;
17 struct kernel_pkey_params;
18 struct public_key_signature;
19
20
21
22
23
24 struct asymmetric_key_subtype {
25 struct module *owner;
26 const char *name;
27 unsigned short name_len;
28
29
30 void (*describe)(const struct key *key, struct seq_file *m);
31
32
33 void (*destroy)(void *payload_crypto, void *payload_auth);
34
35 int (*query)(const struct kernel_pkey_params *params,
36 struct kernel_pkey_query *info);
37
38
39 int (*eds_op)(struct kernel_pkey_params *params,
40 const void *in, void *out);
41
42
43 int (*verify_signature)(const struct key *key,
44 const struct public_key_signature *sig);
45 };
46
47
48
49
50
51
52
53
54 static inline
55 struct asymmetric_key_subtype *asymmetric_key_subtype(const struct key *key)
56 {
57 return key->payload.data[asym_subtype];
58 }
59
60 #endif