Lines Matching refs:sig
25 struct public_key_signature *sig = sinfo->sig; in pkcs7_digest() local
31 kenter(",%u,%s", sinfo->index, sinfo->sig->hash_algo); in pkcs7_digest()
34 if (sig->digest) in pkcs7_digest()
37 if (!sinfo->sig->hash_algo) in pkcs7_digest()
43 tfm = crypto_alloc_shash(sinfo->sig->hash_algo, 0, 0); in pkcs7_digest()
48 sig->digest_size = crypto_shash_digestsize(tfm); in pkcs7_digest()
51 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in pkcs7_digest()
52 if (!sig->digest) in pkcs7_digest()
63 sig->digest); in pkcs7_digest()
66 pr_devel("MsgDigest = [%*ph]\n", 8, sig->digest); in pkcs7_digest()
81 if (sinfo->msgdigest_len != sig->digest_size) { in pkcs7_digest()
88 if (memcmp(sig->digest, sinfo->msgdigest, in pkcs7_digest()
101 memset(sig->digest, 0, sig->digest_size); in pkcs7_digest()
111 sinfo->authattrs_len, sig->digest); in pkcs7_digest()
114 pr_devel("AADigest = [%*ph]\n", 8, sig->digest); in pkcs7_digest()
141 *buf = sinfo->sig->digest; in pkcs7_get_digest()
142 *len = sinfo->sig->digest_size; in pkcs7_get_digest()
145 sinfo->sig->hash_algo); in pkcs7_get_digest()
172 if (!asymmetric_key_id_same(x509->id, sinfo->sig->auth_ids[0])) in pkcs7_find_key()
186 sinfo->sig->auth_ids[0]->len, sinfo->sig->auth_ids[0]->data); in pkcs7_find_key()
196 struct public_key_signature *sig; in pkcs7_verify_sig_chain() local
224 sig = x509->sig; in pkcs7_verify_sig_chain()
225 if (sig->auth_ids[0]) in pkcs7_verify_sig_chain()
227 sig->auth_ids[0]->len, sig->auth_ids[0]->data); in pkcs7_verify_sig_chain()
228 if (sig->auth_ids[1]) in pkcs7_verify_sig_chain()
230 sig->auth_ids[1]->len, sig->auth_ids[1]->data); in pkcs7_verify_sig_chain()
248 auth = sig->auth_ids[0]; in pkcs7_verify_sig_chain()
257 } else if (sig->auth_ids[1]) { in pkcs7_verify_sig_chain()
258 auth = sig->auth_ids[1]; in pkcs7_verify_sig_chain()
278 if (sig->auth_ids[1] && in pkcs7_verify_sig_chain()
279 !asymmetric_key_id_same(p->skid, sig->auth_ids[1])) { in pkcs7_verify_sig_chain()
291 ret = public_key_verify_signature(p->pub, x509->sig); in pkcs7_verify_sig_chain()
354 ret = public_key_verify_signature(sinfo->signer->pub, sinfo->sig); in pkcs7_verify_one()