Thomas Gleixner | b4d0d23 | 2019-05-20 19:08:01 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 2 | /* In-software asymmetric public-key crypto subtype |
| 3 | * |
| 4 | * See Documentation/crypto/asymmetric-keys.txt |
| 5 | * |
| 6 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
| 7 | * Written by David Howells (dhowells@redhat.com) |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #define pr_fmt(fmt) "PKEY: "fmt |
| 11 | #include <linux/module.h> |
| 12 | #include <linux/export.h> |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/slab.h> |
| 15 | #include <linux/seq_file.h> |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 16 | #include <linux/scatterlist.h> |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 17 | #include <keys/asymmetric-subtype.h> |
Tadeusz Struk | db6c43b | 2016-02-02 10:08:53 -0800 | [diff] [blame] | 18 | #include <crypto/public_key.h> |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 19 | #include <crypto/akcipher.h> |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 20 | |
David Howells | 1e684d3 | 2017-11-15 16:38:45 +0000 | [diff] [blame] | 21 | MODULE_DESCRIPTION("In-software asymmetric public-key subtype"); |
| 22 | MODULE_AUTHOR("Red Hat, Inc."); |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 23 | MODULE_LICENSE("GPL"); |
| 24 | |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 25 | /* |
| 26 | * Provide a part of a description of the key for /proc/keys. |
| 27 | */ |
| 28 | static void public_key_describe(const struct key *asymmetric_key, |
| 29 | struct seq_file *m) |
| 30 | { |
David Howells | 146aa8b | 2015-10-21 14:04:48 +0100 | [diff] [blame] | 31 | struct public_key *key = asymmetric_key->payload.data[asym_crypto]; |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 32 | |
| 33 | if (key) |
David Howells | 4e8ae72 | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 34 | seq_printf(m, "%s.%s", key->id_type, key->pkey_algo); |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | /* |
| 38 | * Destroy a public key algorithm key. |
| 39 | */ |
David Howells | 3b76456 | 2016-04-06 16:13:33 +0100 | [diff] [blame] | 40 | void public_key_free(struct public_key *key) |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 41 | { |
David Howells | 3b76456 | 2016-04-06 16:13:33 +0100 | [diff] [blame] | 42 | if (key) { |
Tadeusz Struk | db6c43b | 2016-02-02 10:08:53 -0800 | [diff] [blame] | 43 | kfree(key->key); |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 44 | kfree(key->params); |
David Howells | 3b76456 | 2016-04-06 16:13:33 +0100 | [diff] [blame] | 45 | kfree(key); |
| 46 | } |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 47 | } |
David Howells | 3b76456 | 2016-04-06 16:13:33 +0100 | [diff] [blame] | 48 | EXPORT_SYMBOL_GPL(public_key_free); |
| 49 | |
| 50 | /* |
| 51 | * Destroy a public key algorithm key. |
| 52 | */ |
| 53 | static void public_key_destroy(void *payload0, void *payload3) |
| 54 | { |
| 55 | public_key_free(payload0); |
| 56 | public_key_signature_free(payload3); |
| 57 | } |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 58 | |
| 59 | /* |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 60 | * Determine the crypto algorithm name. |
| 61 | */ |
| 62 | static |
| 63 | int software_key_determine_akcipher(const char *encoding, |
| 64 | const char *hash_algo, |
| 65 | const struct public_key *pkey, |
| 66 | char alg_name[CRYPTO_MAX_ALG_NAME]) |
| 67 | { |
| 68 | int n; |
| 69 | |
| 70 | if (strcmp(encoding, "pkcs1") == 0) { |
| 71 | /* The data wangled by the RSA algorithm is typically padded |
| 72 | * and encoded in some manner, such as EMSA-PKCS1-1_5 [RFC3447 |
| 73 | * sec 8.2]. |
| 74 | */ |
| 75 | if (!hash_algo) |
| 76 | n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, |
| 77 | "pkcs1pad(%s)", |
| 78 | pkey->pkey_algo); |
| 79 | else |
| 80 | n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, |
| 81 | "pkcs1pad(%s,%s)", |
| 82 | pkey->pkey_algo, hash_algo); |
| 83 | return n >= CRYPTO_MAX_ALG_NAME ? -EINVAL : 0; |
| 84 | } |
| 85 | |
| 86 | if (strcmp(encoding, "raw") == 0) { |
| 87 | strcpy(alg_name, pkey->pkey_algo); |
| 88 | return 0; |
| 89 | } |
| 90 | |
| 91 | return -ENOPKG; |
| 92 | } |
| 93 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 94 | static u8 *pkey_pack_u32(u8 *dst, u32 val) |
| 95 | { |
| 96 | memcpy(dst, &val, sizeof(val)); |
| 97 | return dst + sizeof(val); |
| 98 | } |
| 99 | |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 100 | /* |
| 101 | * Query information about a key. |
| 102 | */ |
| 103 | static int software_key_query(const struct kernel_pkey_params *params, |
| 104 | struct kernel_pkey_query *info) |
| 105 | { |
| 106 | struct crypto_akcipher *tfm; |
| 107 | struct public_key *pkey = params->key->payload.data[asym_crypto]; |
| 108 | char alg_name[CRYPTO_MAX_ALG_NAME]; |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 109 | u8 *key, *ptr; |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 110 | int ret, len; |
| 111 | |
| 112 | ret = software_key_determine_akcipher(params->encoding, |
| 113 | params->hash_algo, |
| 114 | pkey, alg_name); |
| 115 | if (ret < 0) |
| 116 | return ret; |
| 117 | |
| 118 | tfm = crypto_alloc_akcipher(alg_name, 0, 0); |
| 119 | if (IS_ERR(tfm)) |
| 120 | return PTR_ERR(tfm); |
| 121 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 122 | key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, |
| 123 | GFP_KERNEL); |
| 124 | if (!key) |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 125 | goto error_free_tfm; |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 126 | memcpy(key, pkey->key, pkey->keylen); |
| 127 | ptr = key + pkey->keylen; |
| 128 | ptr = pkey_pack_u32(ptr, pkey->algo); |
| 129 | ptr = pkey_pack_u32(ptr, pkey->paramlen); |
| 130 | memcpy(ptr, pkey->params, pkey->paramlen); |
| 131 | |
| 132 | if (pkey->key_is_private) |
| 133 | ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); |
| 134 | else |
| 135 | ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); |
| 136 | if (ret < 0) |
| 137 | goto error_free_key; |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 138 | |
| 139 | len = crypto_akcipher_maxsize(tfm); |
| 140 | info->key_size = len * 8; |
| 141 | info->max_data_size = len; |
| 142 | info->max_sig_size = len; |
| 143 | info->max_enc_size = len; |
| 144 | info->max_dec_size = len; |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 145 | info->supported_ops = (KEYCTL_SUPPORTS_ENCRYPT | |
| 146 | KEYCTL_SUPPORTS_VERIFY); |
| 147 | if (pkey->key_is_private) |
| 148 | info->supported_ops |= (KEYCTL_SUPPORTS_DECRYPT | |
| 149 | KEYCTL_SUPPORTS_SIGN); |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 150 | ret = 0; |
| 151 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 152 | error_free_key: |
| 153 | kfree(key); |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 154 | error_free_tfm: |
| 155 | crypto_free_akcipher(tfm); |
| 156 | pr_devel("<==%s() = %d\n", __func__, ret); |
| 157 | return ret; |
| 158 | } |
| 159 | |
| 160 | /* |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 161 | * Do encryption, decryption and signing ops. |
| 162 | */ |
| 163 | static int software_key_eds_op(struct kernel_pkey_params *params, |
| 164 | const void *in, void *out) |
| 165 | { |
| 166 | const struct public_key *pkey = params->key->payload.data[asym_crypto]; |
| 167 | struct akcipher_request *req; |
| 168 | struct crypto_akcipher *tfm; |
| 169 | struct crypto_wait cwait; |
| 170 | struct scatterlist in_sg, out_sg; |
| 171 | char alg_name[CRYPTO_MAX_ALG_NAME]; |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 172 | char *key, *ptr; |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 173 | int ret; |
| 174 | |
| 175 | pr_devel("==>%s()\n", __func__); |
| 176 | |
| 177 | ret = software_key_determine_akcipher(params->encoding, |
| 178 | params->hash_algo, |
| 179 | pkey, alg_name); |
| 180 | if (ret < 0) |
| 181 | return ret; |
| 182 | |
| 183 | tfm = crypto_alloc_akcipher(alg_name, 0, 0); |
| 184 | if (IS_ERR(tfm)) |
| 185 | return PTR_ERR(tfm); |
| 186 | |
| 187 | req = akcipher_request_alloc(tfm, GFP_KERNEL); |
| 188 | if (!req) |
| 189 | goto error_free_tfm; |
| 190 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 191 | key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, |
| 192 | GFP_KERNEL); |
| 193 | if (!key) |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 194 | goto error_free_req; |
| 195 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 196 | memcpy(key, pkey->key, pkey->keylen); |
| 197 | ptr = key + pkey->keylen; |
| 198 | ptr = pkey_pack_u32(ptr, pkey->algo); |
| 199 | ptr = pkey_pack_u32(ptr, pkey->paramlen); |
| 200 | memcpy(ptr, pkey->params, pkey->paramlen); |
| 201 | |
| 202 | if (pkey->key_is_private) |
| 203 | ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); |
| 204 | else |
| 205 | ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); |
| 206 | if (ret) |
| 207 | goto error_free_key; |
| 208 | |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 209 | sg_init_one(&in_sg, in, params->in_len); |
| 210 | sg_init_one(&out_sg, out, params->out_len); |
| 211 | akcipher_request_set_crypt(req, &in_sg, &out_sg, params->in_len, |
| 212 | params->out_len); |
| 213 | crypto_init_wait(&cwait); |
| 214 | akcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG | |
| 215 | CRYPTO_TFM_REQ_MAY_SLEEP, |
| 216 | crypto_req_done, &cwait); |
| 217 | |
| 218 | /* Perform the encryption calculation. */ |
| 219 | switch (params->op) { |
| 220 | case kernel_pkey_encrypt: |
| 221 | ret = crypto_akcipher_encrypt(req); |
| 222 | break; |
| 223 | case kernel_pkey_decrypt: |
| 224 | ret = crypto_akcipher_decrypt(req); |
| 225 | break; |
| 226 | case kernel_pkey_sign: |
| 227 | ret = crypto_akcipher_sign(req); |
| 228 | break; |
| 229 | default: |
| 230 | BUG(); |
| 231 | } |
| 232 | |
| 233 | ret = crypto_wait_req(ret, &cwait); |
| 234 | if (ret == 0) |
| 235 | ret = req->dst_len; |
| 236 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 237 | error_free_key: |
| 238 | kfree(key); |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 239 | error_free_req: |
| 240 | akcipher_request_free(req); |
| 241 | error_free_tfm: |
| 242 | crypto_free_akcipher(tfm); |
| 243 | pr_devel("<==%s() = %d\n", __func__, ret); |
| 244 | return ret; |
| 245 | } |
| 246 | |
| 247 | /* |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 248 | * Verify a signature using a public key. |
| 249 | */ |
Tadeusz Struk | db6c43b | 2016-02-02 10:08:53 -0800 | [diff] [blame] | 250 | int public_key_verify_signature(const struct public_key *pkey, |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 251 | const struct public_key_signature *sig) |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 252 | { |
Gilad Ben-Yossef | 0ca2a04 | 2017-10-18 08:00:40 +0100 | [diff] [blame] | 253 | struct crypto_wait cwait; |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 254 | struct crypto_akcipher *tfm; |
| 255 | struct akcipher_request *req; |
Vitaly Chikunov | c7381b0 | 2019-04-11 18:51:15 +0300 | [diff] [blame] | 256 | struct scatterlist src_sg[2]; |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 257 | char alg_name[CRYPTO_MAX_ALG_NAME]; |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 258 | char *key, *ptr; |
Eric Biggers | 72f9a07 | 2017-12-08 15:13:29 +0000 | [diff] [blame] | 259 | int ret; |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 260 | |
| 261 | pr_devel("==>%s()\n", __func__); |
| 262 | |
Tadeusz Struk | db6c43b | 2016-02-02 10:08:53 -0800 | [diff] [blame] | 263 | BUG_ON(!pkey); |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 264 | BUG_ON(!sig); |
Tadeusz Struk | db6c43b | 2016-02-02 10:08:53 -0800 | [diff] [blame] | 265 | BUG_ON(!sig->s); |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 266 | |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 267 | ret = software_key_determine_akcipher(sig->encoding, |
| 268 | sig->hash_algo, |
| 269 | pkey, alg_name); |
| 270 | if (ret < 0) |
| 271 | return ret; |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 272 | |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 273 | tfm = crypto_alloc_akcipher(alg_name, 0, 0); |
| 274 | if (IS_ERR(tfm)) |
| 275 | return PTR_ERR(tfm); |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 276 | |
Eric Biggers | 72f9a07 | 2017-12-08 15:13:29 +0000 | [diff] [blame] | 277 | ret = -ENOMEM; |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 278 | req = akcipher_request_alloc(tfm, GFP_KERNEL); |
| 279 | if (!req) |
| 280 | goto error_free_tfm; |
| 281 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 282 | key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, |
| 283 | GFP_KERNEL); |
| 284 | if (!key) |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 285 | goto error_free_req; |
| 286 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 287 | memcpy(key, pkey->key, pkey->keylen); |
| 288 | ptr = key + pkey->keylen; |
| 289 | ptr = pkey_pack_u32(ptr, pkey->algo); |
| 290 | ptr = pkey_pack_u32(ptr, pkey->paramlen); |
| 291 | memcpy(ptr, pkey->params, pkey->paramlen); |
| 292 | |
| 293 | if (pkey->key_is_private) |
| 294 | ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); |
| 295 | else |
| 296 | ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); |
| 297 | if (ret) |
| 298 | goto error_free_key; |
| 299 | |
Vitaly Chikunov | c7381b0 | 2019-04-11 18:51:15 +0300 | [diff] [blame] | 300 | sg_init_table(src_sg, 2); |
| 301 | sg_set_buf(&src_sg[0], sig->s, sig->s_size); |
Vitaly Chikunov | 83bc029 | 2019-04-11 18:51:16 +0300 | [diff] [blame] | 302 | sg_set_buf(&src_sg[1], sig->digest, sig->digest_size); |
Vitaly Chikunov | c7381b0 | 2019-04-11 18:51:15 +0300 | [diff] [blame] | 303 | akcipher_request_set_crypt(req, src_sg, NULL, sig->s_size, |
| 304 | sig->digest_size); |
Gilad Ben-Yossef | 0ca2a04 | 2017-10-18 08:00:40 +0100 | [diff] [blame] | 305 | crypto_init_wait(&cwait); |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 306 | akcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG | |
| 307 | CRYPTO_TFM_REQ_MAY_SLEEP, |
Gilad Ben-Yossef | 0ca2a04 | 2017-10-18 08:00:40 +0100 | [diff] [blame] | 308 | crypto_req_done, &cwait); |
Gilad Ben-Yossef | 0ca2a04 | 2017-10-18 08:00:40 +0100 | [diff] [blame] | 309 | ret = crypto_wait_req(crypto_akcipher_verify(req), &cwait); |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 310 | |
Vitaly Chikunov | f1774cb | 2019-04-11 18:51:17 +0300 | [diff] [blame] | 311 | error_free_key: |
| 312 | kfree(key); |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 313 | error_free_req: |
| 314 | akcipher_request_free(req); |
| 315 | error_free_tfm: |
| 316 | crypto_free_akcipher(tfm); |
| 317 | pr_devel("<==%s() = %d\n", __func__, ret); |
Eric Biggers | 72f9a07 | 2017-12-08 15:13:29 +0000 | [diff] [blame] | 318 | if (WARN_ON_ONCE(ret > 0)) |
| 319 | ret = -EINVAL; |
David Howells | d43de6c | 2016-03-03 21:49:27 +0000 | [diff] [blame] | 320 | return ret; |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 321 | } |
| 322 | EXPORT_SYMBOL_GPL(public_key_verify_signature); |
| 323 | |
| 324 | static int public_key_verify_signature_2(const struct key *key, |
| 325 | const struct public_key_signature *sig) |
| 326 | { |
David Howells | 146aa8b | 2015-10-21 14:04:48 +0100 | [diff] [blame] | 327 | const struct public_key *pk = key->payload.data[asym_crypto]; |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 328 | return public_key_verify_signature(pk, sig); |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | /* |
| 332 | * Public key algorithm asymmetric key subtype |
| 333 | */ |
| 334 | struct asymmetric_key_subtype public_key_subtype = { |
| 335 | .owner = THIS_MODULE, |
| 336 | .name = "public_key", |
David Howells | 876c6e3 | 2014-09-02 13:52:10 +0100 | [diff] [blame] | 337 | .name_len = sizeof("public_key") - 1, |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 338 | .describe = public_key_describe, |
| 339 | .destroy = public_key_destroy, |
David Howells | 82f94f2 | 2018-10-09 17:47:23 +0100 | [diff] [blame] | 340 | .query = software_key_query, |
David Howells | c08fed7 | 2018-10-09 17:47:38 +0100 | [diff] [blame] | 341 | .eds_op = software_key_eds_op, |
David Howells | 3d167d6 | 2013-08-30 16:15:30 +0100 | [diff] [blame] | 342 | .verify_signature = public_key_verify_signature_2, |
David Howells | a9681bf | 2012-09-21 23:24:55 +0100 | [diff] [blame] | 343 | }; |
| 344 | EXPORT_SYMBOL_GPL(public_key_subtype); |