0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _KEYS_ASYMMETRIC_SUBTYPE_H
0011 #define _KEYS_ASYMMETRIC_SUBTYPE_H
0012
0013 #include <linux/seq_file.h>
0014 #include <keys/asymmetric-type.h>
0015
0016 struct kernel_pkey_query;
0017 struct kernel_pkey_params;
0018 struct public_key_signature;
0019
0020
0021
0022
0023
0024 struct asymmetric_key_subtype {
0025 struct module *owner;
0026 const char *name;
0027 unsigned short name_len;
0028
0029
0030 void (*describe)(const struct key *key, struct seq_file *m);
0031
0032
0033 void (*destroy)(void *payload_crypto, void *payload_auth);
0034
0035 int (*query)(const struct kernel_pkey_params *params,
0036 struct kernel_pkey_query *info);
0037
0038
0039 int (*eds_op)(struct kernel_pkey_params *params,
0040 const void *in, void *out);
0041
0042
0043 int (*verify_signature)(const struct key *key,
0044 const struct public_key_signature *sig);
0045 };
0046
0047
0048
0049
0050
0051
0052
0053
0054 static inline
0055 struct asymmetric_key_subtype *asymmetric_key_subtype(const struct key *key)
0056 {
0057 return key->payload.data[asym_subtype];
0058 }
0059
0060 #endif