Home
last modified time | relevance | path

Searched refs:prep (Results 1 – 25 of 44) sorted by relevance

12

/linux/crypto/asymmetric_keys/
A Dpkcs7_key_type.c31 struct key_preparsed_payload *prep = ctx; in pkcs7_view_content() local
36 saved_prep_data = prep->data; in pkcs7_view_content()
37 saved_prep_datalen = prep->datalen; in pkcs7_view_content()
38 prep->data = data; in pkcs7_view_content()
39 prep->datalen = len; in pkcs7_view_content()
41 ret = user_preparse(prep); in pkcs7_view_content()
43 prep->data = saved_prep_data; in pkcs7_view_content()
44 prep->datalen = saved_prep_datalen; in pkcs7_view_content()
51 static int pkcs7_preparse(struct key_preparsed_payload *prep) in pkcs7_preparse() argument
61 prep->data, prep->datalen, in pkcs7_preparse()
[all …]
A Dtpm_parser.c56 static int tpm_key_preparse(struct key_preparsed_payload *prep) in tpm_key_preparse() argument
64 if (prep->datalen > 256 * 4) in tpm_key_preparse()
67 tk = tpm_parse(prep->data, prep->datalen); in tpm_key_preparse()
74 prep->payload.data[asym_subtype] = &asym_tpm_subtype; in tpm_key_preparse()
75 prep->payload.data[asym_key_ids] = NULL; in tpm_key_preparse()
76 prep->payload.data[asym_crypto] = tk; in tpm_key_preparse()
77 prep->payload.data[asym_auth] = NULL; in tpm_key_preparse()
78 prep->quotalen = 100; in tpm_key_preparse()
A Dpkcs8_parser.c136 static int pkcs8_key_preparse(struct key_preparsed_payload *prep) in pkcs8_key_preparse() argument
140 pub = pkcs8_parse(prep->data, prep->datalen); in pkcs8_key_preparse()
149 prep->payload.data[asym_subtype] = &public_key_subtype; in pkcs8_key_preparse()
150 prep->payload.data[asym_key_ids] = NULL; in pkcs8_key_preparse()
151 prep->payload.data[asym_crypto] = pub; in pkcs8_key_preparse()
152 prep->payload.data[asym_auth] = NULL; in pkcs8_key_preparse()
153 prep->quotalen = 100; in pkcs8_key_preparse()
A Dx509_public_key.c161 static int x509_key_preparse(struct key_preparsed_payload *prep) in x509_key_preparse() argument
170 cert = x509_cert_parse(prep->data, prep->datalen); in x509_key_preparse()
229 prep->payload.data[asym_subtype] = &public_key_subtype; in x509_key_preparse()
230 prep->payload.data[asym_key_ids] = kids; in x509_key_preparse()
231 prep->payload.data[asym_crypto] = cert->pub; in x509_key_preparse()
232 prep->payload.data[asym_auth] = cert->sig; in x509_key_preparse()
233 prep->description = desc; in x509_key_preparse()
234 prep->quotalen = 100; in x509_key_preparse()
A Dasymmetric_type.c371 static int asymmetric_key_preparse(struct key_preparsed_payload *prep) in asymmetric_key_preparse() argument
378 if (prep->datalen == 0) in asymmetric_key_preparse()
387 ret = parser->parse(prep); in asymmetric_key_preparse()
417 static void asymmetric_key_free_preparse(struct key_preparsed_payload *prep) in asymmetric_key_free_preparse() argument
419 struct asymmetric_key_subtype *subtype = prep->payload.data[asym_subtype]; in asymmetric_key_free_preparse()
420 struct asymmetric_key_ids *kids = prep->payload.data[asym_key_ids]; in asymmetric_key_free_preparse()
425 subtype->destroy(prep->payload.data[asym_crypto], in asymmetric_key_free_preparse()
426 prep->payload.data[asym_auth]); in asymmetric_key_free_preparse()
430 kfree(prep->description); in asymmetric_key_free_preparse()
/linux/security/keys/
A Dkey.c508 memset(&prep, 0, sizeof(prep)); in key_instantiate_and_link()
510 prep.data = data; in key_instantiate_and_link()
511 prep.datalen = datalen; in key_instantiate_and_link()
513 prep.expiry = TIME64_MAX; in key_instantiate_and_link()
859 memset(&prep, 0, sizeof(prep)); in key_create_or_update()
861 prep.data = payload; in key_create_or_update()
862 prep.datalen = plen; in key_create_or_update()
864 prep.expiry = TIME64_MAX; in key_create_or_update()
1020 memset(&prep, 0, sizeof(prep)); in key_update()
1021 prep.data = payload; in key_update()
[all …]
A Dbig_key.c56 int big_key_preparse(struct key_preparsed_payload *prep) in big_key_preparse() argument
62 size_t datalen = prep->datalen; in big_key_preparse()
66 if (datalen <= 0 || datalen > 1024 * 1024 || !prep->data) in big_key_preparse()
70 prep->quotalen = 16; in big_key_preparse()
120 prep->payload.data[big_key_data] = enckey; in big_key_preparse()
132 prep->payload.data[big_key_data] = data; in big_key_preparse()
133 memcpy(data, prep->data, prep->datalen); in big_key_preparse()
151 if (prep->datalen > BIG_KEY_FILE_THRESHOLD) { in big_key_free_preparse()
156 kfree_sensitive(prep->payload.data[big_key_data]); in big_key_free_preparse()
199 ret = key_payload_reserve(key, prep->datalen); in big_key_update()
[all …]
A Duser_defined.c59 int user_preparse(struct key_preparsed_payload *prep) in user_preparse() argument
62 size_t datalen = prep->datalen; in user_preparse()
64 if (datalen <= 0 || datalen > 32767 || !prep->data) in user_preparse()
72 prep->quotalen = datalen; in user_preparse()
73 prep->payload.data[0] = upayload; in user_preparse()
75 memcpy(upayload->data, prep->data, datalen); in user_preparse()
85 kfree_sensitive(prep->payload.data[0]); in user_free_preparse()
107 ret = key_payload_reserve(key, prep->datalen); in user_update()
112 key->expiry = prep->expiry; in user_update()
115 rcu_assign_keypointer(key, prep->payload.data[0]); in user_update()
[all …]
A Drequest_key_auth.c42 static int request_key_auth_preparse(struct key_preparsed_payload *prep) in request_key_auth_preparse() argument
47 static void request_key_auth_free_preparse(struct key_preparsed_payload *prep) in request_key_auth_free_preparse() argument
55 struct key_preparsed_payload *prep) in request_key_auth_instantiate() argument
57 rcu_assign_keypointer(key, (struct request_key_auth *)prep->data); in request_key_auth_instantiate()
/linux/net/rxrpc/
A Dkey.c116 prep->payload.data[1] = (void *)((unsigned long)prep->payload.data[1] + 1); in rxrpc_preparse_xdr_rxkad()
125 if (expiry < prep->expiry) in rxrpc_preparse_xdr_rxkad()
126 prep->expiry = expiry; in rxrpc_preparse_xdr_rxkad()
146 prep->datalen); in rxrpc_preparse_xdr()
289 if (!prep->data && prep->datalen == 0) in rxrpc_preparse()
301 if (prep->datalen <= 4 || !prep->data) in rxrpc_preparse()
304 prep->data += sizeof(kver); in rxrpc_preparse()
318 v1 = prep->data; in rxrpc_preparse()
361 prep->payload.data[1] = (void *)((unsigned long)prep->payload.data[1] + 1); in rxrpc_preparse()
369 if (expiry < prep->expiry) in rxrpc_preparse()
[all …]
A Dserver_key.c67 static int rxrpc_preparse_s(struct key_preparsed_payload *prep) in rxrpc_preparse_s() argument
73 _enter("%zu", prep->datalen); in rxrpc_preparse_s()
75 if (!prep->orig_description) in rxrpc_preparse_s()
78 if (sscanf(prep->orig_description, "%u:%u%n", &service, &sec_class, &n) != 2) in rxrpc_preparse_s()
85 prep->payload.data[1] = (struct rxrpc_security *)sec; in rxrpc_preparse_s()
87 return sec->preparse_server_key(prep); in rxrpc_preparse_s()
90 static void rxrpc_free_preparse_s(struct key_preparsed_payload *prep) in rxrpc_free_preparse_s() argument
92 const struct rxrpc_security *sec = prep->payload.data[1]; in rxrpc_free_preparse_s()
95 sec->free_preparse_server_key(prep); in rxrpc_free_preparse_s()
/linux/net/dns_resolver/
A Ddns_key.c92 dns_resolver_preparse(struct key_preparsed_payload *prep) in dns_resolver_preparse() argument
98 int datalen = prep->datalen, result_len = 0; in dns_resolver_preparse()
99 const char *data = prep->data, *end, *opt; in dns_resolver_preparse()
189 prep->payload.data[dns_key_error] = ERR_PTR(-derrno); in dns_resolver_preparse()
202 if (prep->payload.data[dns_key_error]) { in dns_resolver_preparse()
203 kleave(" = 0 [h_error %ld]", PTR_ERR(prep->payload.data[dns_key_error])); in dns_resolver_preparse()
209 prep->quotalen = result_len; in dns_resolver_preparse()
221 prep->payload.data[dns_key_data] = upayload; in dns_resolver_preparse()
229 static void dns_resolver_free_preparse(struct key_preparsed_payload *prep) in dns_resolver_free_preparse() argument
233 kfree(prep->payload.data[dns_key_data]); in dns_resolver_free_preparse()
/linux/include/linux/
A Dkey-type.h84 int (*preparse)(struct key_preparsed_payload *prep);
88 void (*free_preparse)(struct key_preparsed_payload *prep);
94 int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
101 int (*update)(struct key *key, struct key_preparsed_payload *prep);
190 extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep);
/linux/net/ceph/
A Dcrypto.c298 static int ceph_key_preparse(struct key_preparsed_payload *prep) in ceph_key_preparse() argument
301 size_t datalen = prep->datalen; in ceph_key_preparse()
306 if (datalen <= 0 || datalen > 32767 || !prep->data) in ceph_key_preparse()
315 p = (void *)prep->data; in ceph_key_preparse()
316 ret = ceph_crypto_key_decode(ckey, &p, (char*)prep->data+datalen); in ceph_key_preparse()
320 prep->payload.data[0] = ckey; in ceph_key_preparse()
321 prep->quotalen = datalen; in ceph_key_preparse()
330 static void ceph_key_free_preparse(struct key_preparsed_payload *prep) in ceph_key_free_preparse() argument
332 struct ceph_crypto_key *ckey = prep->payload.data[0]; in ceph_key_free_preparse()
/linux/security/keys/trusted-keys/
A Dtrusted_core.c139 struct key_preparsed_payload *prep) in trusted_instantiate() argument
142 size_t datalen = prep->datalen; in trusted_instantiate()
148 if (datalen <= 0 || datalen > 32767 || !prep->data) in trusted_instantiate()
154 memcpy(datablob, prep->data, datalen); in trusted_instantiate()
218 static int trusted_update(struct key *key, struct key_preparsed_payload *prep) in trusted_update() argument
222 size_t datalen = prep->datalen; in trusted_update()
231 if (datalen <= 0 || datalen > 32767 || !prep->data) in trusted_update()
244 memcpy(datablob, prep->data, datalen); in trusted_update()
/linux/include/keys/
A Dbig_key-type.h15 extern int big_key_preparse(struct key_preparsed_payload *prep);
16 extern void big_key_free_preparse(struct key_preparsed_payload *prep);
21 extern int big_key_update(struct key *key, struct key_preparsed_payload *prep);
A Duser-type.h38 extern int user_preparse(struct key_preparsed_payload *prep);
39 extern void user_free_preparse(struct key_preparsed_payload *prep);
40 extern int user_update(struct key *key, struct key_preparsed_payload *prep);
/linux/net/smc/
A Dsmc_tx.h23 union smc_host_cursor sent, prep; in smc_tx_prepared_sends() local
26 smc_curs_copy(&prep, &conn->tx_curs_prep, conn); in smc_tx_prepared_sends()
27 return smc_curs_diff(conn->sndbuf_desc->len, &sent, &prep); in smc_tx_prepared_sends()
A Dsmc_tx.c143 union smc_host_cursor prep; in smc_tx_sendmsg() local
197 smc_curs_copy(&prep, &conn->tx_curs_prep, conn); in smc_tx_sendmsg()
198 tx_cnt_prep = prep.count; in smc_tx_sendmsg()
227 smc_curs_add(conn->sndbuf_desc->len, &prep, copylen); in smc_tx_sendmsg()
228 smc_curs_copy(&conn->tx_curs_prep, &prep, conn); in smc_tx_sendmsg()
422 union smc_host_cursor sent, prep, prod, cons; in smc_tx_rdma_writes() local
429 smc_curs_copy(&prep, &conn->tx_curs_prep, conn); in smc_tx_rdma_writes()
431 to_send = smc_curs_diff(conn->sndbuf_desc->len, &sent, &prep); in smc_tx_rdma_writes()
/linux/fs/crypto/
A Dkeyring.c65 struct key_preparsed_payload *prep) in fscrypt_key_instantiate() argument
67 key->payload.data[0] = (struct fscrypt_master_key *)prep->data; in fscrypt_key_instantiate()
103 struct key_preparsed_payload *prep) in fscrypt_user_key_instantiate() argument
506 const struct fscrypt_provisioning_key_payload *payload = prep->data; in fscrypt_provisioning_key_preparse()
508 if (prep->datalen < sizeof(*payload) + FSCRYPT_MIN_KEY_SIZE || in fscrypt_provisioning_key_preparse()
509 prep->datalen > sizeof(*payload) + FSCRYPT_MAX_KEY_SIZE) in fscrypt_provisioning_key_preparse()
519 prep->payload.data[0] = kmemdup(payload, prep->datalen, GFP_KERNEL); in fscrypt_provisioning_key_preparse()
520 if (!prep->payload.data[0]) in fscrypt_provisioning_key_preparse()
523 prep->quotalen = prep->datalen; in fscrypt_provisioning_key_preparse()
528 struct key_preparsed_payload *prep) in fscrypt_provisioning_key_free_preparse() argument
[all …]
/linux/certs/
A Dblacklist.c61 static int blacklist_preparse(struct key_preparsed_payload *prep) in blacklist_preparse() argument
63 if (prep->datalen > 0) in blacklist_preparse()
68 static void blacklist_free_preparse(struct key_preparsed_payload *prep) in blacklist_free_preparse() argument
/linux/fs/cifs/
A Dcifs_spnego.c25 cifs_spnego_key_instantiate(struct key *key, struct key_preparsed_payload *prep) in cifs_spnego_key_instantiate() argument
31 payload = kmemdup(prep->data, prep->datalen, GFP_KERNEL); in cifs_spnego_key_instantiate()
/linux/security/keys/encrypted-keys/
A Dencrypted.c782 struct key_preparsed_payload *prep) in encrypted_instantiate() argument
790 size_t datalen = prep->datalen; in encrypted_instantiate()
793 if (datalen <= 0 || datalen > 32767 || !prep->data) in encrypted_instantiate()
800 memcpy(datablob, prep->data, datalen); in encrypted_instantiate()
842 static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) in encrypted_update() argument
849 size_t datalen = prep->datalen; in encrypted_update()
854 if (datalen <= 0 || datalen > 32767 || !prep->data) in encrypted_update()
862 memcpy(buf, prep->data, datalen); in encrypted_update()
/linux/drivers/soundwire/
A Dstream.c423 bool prep) in sdw_prep_deprep_slave_ports() argument
444 prep_ch.prepare = prep; in sdw_prep_deprep_slave_ports()
457 if (prep && intr) { in sdw_prep_deprep_slave_ports()
458 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
471 if (prep) in sdw_prep_deprep_slave_ports()
500 if (!prep && intr) in sdw_prep_deprep_slave_ports()
501 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
509 bool prep) in sdw_prep_deprep_master_ports() argument
519 prep_ch.prepare = prep; /* Prepare/De-prepare */ in sdw_prep_deprep_master_ports()
552 p_rt, prep); in sdw_prep_deprep_ports()
[all …]
/linux/drivers/net/wwan/iosm/
A Diosm_ipc_protocol.c56 enum ipc_msg_prep_type prep, in ipc_protocol_msg_send() argument
75 send_args.msg_type = prep; in ipc_protocol_msg_send()
88 dev_err(ipc_protocol->dev, "msg %d failed", prep); in ipc_protocol_msg_send()

Completed in 49 milliseconds

12