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()
177 if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo) != 0) { in pkcs7_find_key()
192 sinfo->sig->auth_ids[0]->len, sinfo->sig->auth_ids[0]->data); in pkcs7_find_key()
202 struct public_key_signature *sig; in pkcs7_verify_sig_chain() local
233 sig = x509->sig; in pkcs7_verify_sig_chain()
234 if (sig->auth_ids[0]) in pkcs7_verify_sig_chain()
236 sig->auth_ids[0]->len, sig->auth_ids[0]->data); in pkcs7_verify_sig_chain()
237 if (sig->auth_ids[1]) in pkcs7_verify_sig_chain()
239 sig->auth_ids[1]->len, sig->auth_ids[1]->data); in pkcs7_verify_sig_chain()
257 auth = sig->auth_ids[0]; in pkcs7_verify_sig_chain()
266 } else if (sig->auth_ids[1]) { in pkcs7_verify_sig_chain()
267 auth = sig->auth_ids[1]; in pkcs7_verify_sig_chain()
287 if (sig->auth_ids[1] && in pkcs7_verify_sig_chain()
288 !asymmetric_key_id_same(p->skid, sig->auth_ids[1])) { in pkcs7_verify_sig_chain()
300 ret = public_key_verify_signature(p->pub, x509->sig); in pkcs7_verify_sig_chain()
363 ret = public_key_verify_signature(sinfo->signer->pub, sinfo->sig); in pkcs7_verify_one()