Lines Matching refs:sig

25 	struct public_key_signature *sig = cert->sig;  in x509_get_sig_params()  local
33 sig->data = cert->tbs; in x509_get_sig_params()
34 sig->data_size = cert->tbs_size; in x509_get_sig_params()
39 if (!sig->pkey_algo) in x509_get_sig_params()
43 if (!sig->hash_algo) { in x509_get_sig_params()
48 sig->s = kmemdup(cert->raw_sig, cert->raw_sig_size, GFP_KERNEL); in x509_get_sig_params()
49 if (!sig->s) in x509_get_sig_params()
52 sig->s_size = cert->raw_sig_size; in x509_get_sig_params()
57 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in x509_get_sig_params()
67 sig->digest_size = crypto_shash_digestsize(tfm); in x509_get_sig_params()
70 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in x509_get_sig_params()
71 if (!sig->digest) in x509_get_sig_params()
80 ret = crypto_shash_digest(desc, cert->tbs, cert->tbs_size, sig->digest); in x509_get_sig_params()
84 ret = is_hash_blacklisted(sig->digest, sig->digest_size, "tbs"); in x509_get_sig_params()
87 sig->digest_size, sig->digest); in x509_get_sig_params()
115 if (cert->sig->auth_ids[0] || cert->sig->auth_ids[1]) { in x509_check_for_self_signed()
119 bool a = asymmetric_key_id_same(cert->skid, cert->sig->auth_ids[1]); in x509_check_for_self_signed()
120 bool b = asymmetric_key_id_same(cert->id, cert->sig->auth_ids[0]); in x509_check_for_self_signed()
127 cert->sig->auth_ids[0] && cert->sig->auth_ids[1]) in x509_check_for_self_signed()
132 if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0 && in x509_check_for_self_signed()
134 strcmp(cert->sig->pkey_algo, "ecdsa") != 0)) in x509_check_for_self_signed()
137 ret = public_key_verify_signature(cert->pub, cert->sig); in x509_check_for_self_signed()
188 public_key_signature_free(cert->sig); in x509_key_preparse()
189 cert->sig = NULL; in x509_key_preparse()
192 cert->sig->pkey_algo, cert->sig->hash_algo); in x509_key_preparse()
232 prep->payload.data[asym_auth] = cert->sig; in x509_key_preparse()
240 cert->sig = NULL; in x509_key_preparse()