Lines Matching refs:modsig
18 struct modsig { struct
41 struct modsig **modsig) in ima_read_modsig() argument
45 struct modsig *hdr; in ima_read_modsig()
85 *modsig = hdr; in ima_read_modsig()
97 void ima_collect_modsig(struct modsig *modsig, const void *buf, loff_t size) in ima_collect_modsig() argument
105 size -= modsig->raw_pkcs7_len + strlen(MODULE_SIG_STRING) + in ima_collect_modsig()
107 rc = pkcs7_supply_detached_data(modsig->pkcs7_msg, buf, size); in ima_collect_modsig()
112 rc = pkcs7_get_digest(modsig->pkcs7_msg, &modsig->digest, in ima_collect_modsig()
113 &modsig->digest_size, &modsig->hash_algo); in ima_collect_modsig()
116 int ima_modsig_verify(struct key *keyring, const struct modsig *modsig) in ima_modsig_verify() argument
118 return verify_pkcs7_message_sig(NULL, 0, modsig->pkcs7_msg, keyring, in ima_modsig_verify()
122 int ima_get_modsig_digest(const struct modsig *modsig, enum hash_algo *algo, in ima_get_modsig_digest() argument
125 *algo = modsig->hash_algo; in ima_get_modsig_digest()
126 *digest = modsig->digest; in ima_get_modsig_digest()
127 *digest_size = modsig->digest_size; in ima_get_modsig_digest()
132 int ima_get_raw_modsig(const struct modsig *modsig, const void **data, in ima_get_raw_modsig() argument
135 *data = &modsig->raw_pkcs7; in ima_get_raw_modsig()
136 *data_len = modsig->raw_pkcs7_len; in ima_get_raw_modsig()
141 void ima_free_modsig(struct modsig *modsig) in ima_free_modsig() argument
143 if (!modsig) in ima_free_modsig()
146 pkcs7_free_message(modsig->pkcs7_msg); in ima_free_modsig()
147 kfree(modsig); in ima_free_modsig()