Searched refs:hdr (Results 1 – 11 of 11) sorted by relevance
/security/integrity/ima/ |
D | ima_modsig.c | 45 struct modsig *hdr; in ima_read_modsig() local 68 hdr = kzalloc(sizeof(*hdr) + sig_len, GFP_KERNEL); in ima_read_modsig() 69 if (!hdr) in ima_read_modsig() 72 hdr->pkcs7_msg = pkcs7_parse_message(buf + buf_len, sig_len); in ima_read_modsig() 73 if (IS_ERR(hdr->pkcs7_msg)) { in ima_read_modsig() 74 rc = PTR_ERR(hdr->pkcs7_msg); in ima_read_modsig() 75 kfree(hdr); in ima_read_modsig() 79 memcpy(hdr->raw_pkcs7, buf + buf_len, sig_len); in ima_read_modsig() 80 hdr->raw_pkcs7_len = sig_len; in ima_read_modsig() 83 hdr->hash_algo = HASH_ALGO__LAST; in ima_read_modsig() [all …]
|
D | ima_template.c | 416 struct ima_field_data hdr[HDR__LAST] = { in ima_restore_measurement_list() local 462 ret = ima_parse_buf(bufp, bufendp, &bufp, HDR__LAST, hdr, NULL, in ima_restore_measurement_list() 467 if (hdr[HDR_TEMPLATE_NAME].len >= MAX_TEMPLATE_NAME_LEN) { in ima_restore_measurement_list() 474 memcpy(template_name, hdr[HDR_TEMPLATE_NAME].data, in ima_restore_measurement_list() 475 hdr[HDR_TEMPLATE_NAME].len); in ima_restore_measurement_list() 476 template_name[hdr[HDR_TEMPLATE_NAME].len] = 0; in ima_restore_measurement_list() 507 hdr[HDR_TEMPLATE_DATA].data, in ima_restore_measurement_list() 508 hdr[HDR_TEMPLATE_DATA].len, in ima_restore_measurement_list() 513 if (memcmp(hdr[HDR_DIGEST].data, zero, sizeof(zero))) { in ima_restore_measurement_list() 524 entry->pcr = !ima_canonical_fmt ? *(u32 *)(hdr[HDR_PCR].data) : in ima_restore_measurement_list() [all …]
|
D | ima_init.c | 53 struct ima_digest_data hdr; in ima_add_boot_aggregate() member 59 iint->ima_hash = &hash.hdr; in ima_add_boot_aggregate() 76 result = ima_calc_boot_aggregate(&hash.hdr); in ima_add_boot_aggregate()
|
D | ima_template_lib.c | 311 struct ima_digest_data hdr; in ima_eventdigest_init() member 332 hash.hdr.algo = HASH_ALGO_SHA1; in ima_eventdigest_init() 333 result = ima_calc_boot_aggregate(&hash.hdr); in ima_eventdigest_init() 336 if (!result && hash.hdr.algo != HASH_ALGO_SHA1) in ima_eventdigest_init() 343 cur_digest = hash.hdr.digest; in ima_eventdigest_init() 352 hash.hdr.algo = ima_template_hash_algo_allowed(ima_hash_algo) ? in ima_eventdigest_init() 354 result = ima_calc_file_hash(event_data->file, &hash.hdr); in ima_eventdigest_init() 361 cur_digest = hash.hdr.digest; in ima_eventdigest_init() 362 cur_digestsize = hash.hdr.length; in ima_eventdigest_init()
|
D | ima_api.c | 226 struct ima_digest_data hdr; in ima_collect_measurement() member 247 hash.hdr.algo = algo; in ima_collect_measurement() 253 result = ima_calc_buffer_hash(buf, size, &hash.hdr); in ima_collect_measurement() 255 result = ima_calc_file_hash(file, &hash.hdr); in ima_collect_measurement() 260 length = sizeof(hash.hdr) + hash.hdr.length; in ima_collect_measurement()
|
D | ima_main.c | 895 struct ima_digest_data hdr; in process_buffer_measurement() member 936 iint.ima_hash = &hash.hdr; in process_buffer_measurement() 947 memcpy(digest_hash, hash.hdr.digest, digest_hash_len); in process_buffer_measurement()
|
/security/integrity/ |
D | digsig_asymmetric.c | 86 struct signature_v2_hdr *hdr = (struct signature_v2_hdr *)sig; in asymmetric_verify() local 91 if (siglen <= sizeof(*hdr)) in asymmetric_verify() 94 siglen -= sizeof(*hdr); in asymmetric_verify() 96 if (siglen != be16_to_cpu(hdr->sig_size)) in asymmetric_verify() 99 if (hdr->hash_algo >= HASH_ALGO__LAST) in asymmetric_verify() 102 key = request_asymmetric_key(keyring, be32_to_cpu(hdr->keyid)); in asymmetric_verify() 108 pks.hash_algo = hash_algo_name[hdr->hash_algo]; in asymmetric_verify() 127 pks.s = hdr->sig; in asymmetric_verify()
|
/security/integrity/evm/ |
D | evm_main.c | 180 struct signature_v2_hdr *hdr; in evm_verify_hmac() local 219 digest.hdr.algo = HASH_ALGO_SHA1; in evm_verify_hmac() 239 hdr = (struct signature_v2_hdr *)xattr_data; in evm_verify_hmac() 240 digest.hdr.algo = hdr->hash_algo; in evm_verify_hmac() 247 digest.digest, digest.hdr.length); in evm_verify_hmac() 277 pr_debug("digest: (%d) [%*phN]\n", digest.hdr.length, digest.hdr.length, in evm_verify_hmac()
|
D | evm_crypto.c | 229 desc = init_desc(type, data->hdr.algo); in evm_calc_hmac_or_hash() 233 data->hdr.length = crypto_shash_digestsize(desc->tfm); in evm_calc_hmac_or_hash() 373 data.hdr.algo = HASH_ALGO_SHA1; in evm_update_evmxattr() 377 data.hdr.xattr.sha1.type = EVM_XATTR_HMAC; in evm_update_evmxattr() 380 &data.hdr.xattr.data[1], in evm_update_evmxattr()
|
D | evm.h | 48 struct ima_digest_data hdr; member
|
/security/smack/ |
D | smack_lsm.c | 4151 struct iphdr *hdr; in smack_inet_conn_request() local 4211 hdr = ip_hdr(skb); in smack_inet_conn_request() 4212 addr.sin_addr.s_addr = hdr->saddr; in smack_inet_conn_request()
|