Lines Matching refs:sig

27 	struct public_key_signature *sig = cert->sig;  in x509_get_sig_params()  local
35 sig->s = kmemdup(cert->raw_sig, cert->raw_sig_size, GFP_KERNEL); in x509_get_sig_params()
36 if (!sig->s) in x509_get_sig_params()
39 sig->s_size = cert->raw_sig_size; in x509_get_sig_params()
44 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in x509_get_sig_params()
54 sig->digest_size = crypto_shash_digestsize(tfm); in x509_get_sig_params()
57 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in x509_get_sig_params()
58 if (!sig->digest) in x509_get_sig_params()
68 ret = strcmp(sig->hash_algo, "sm3") != 0 ? -EINVAL : in x509_get_sig_params()
71 cert->pub->keylen, sig->digest) ?: in x509_get_sig_params()
73 crypto_shash_update(desc, sig->digest, in x509_get_sig_params()
74 sig->digest_size) ?: in x509_get_sig_params()
76 sig->digest); in x509_get_sig_params()
79 sig->digest); in x509_get_sig_params()
85 ret = is_hash_blacklisted(sig->digest, sig->digest_size, in x509_get_sig_params()
89 sig->digest_size, sig->digest); in x509_get_sig_params()
117 if (cert->sig->auth_ids[0] || cert->sig->auth_ids[1]) { in x509_check_for_self_signed()
121 bool a = asymmetric_key_id_same(cert->skid, cert->sig->auth_ids[1]); in x509_check_for_self_signed()
122 bool b = asymmetric_key_id_same(cert->id, cert->sig->auth_ids[0]); in x509_check_for_self_signed()
129 cert->sig->auth_ids[0] && cert->sig->auth_ids[1]) in x509_check_for_self_signed()
138 ret = public_key_verify_signature(cert->pub, cert->sig); in x509_check_for_self_signed()
183 public_key_signature_free(cert->sig); in x509_key_preparse()
184 cert->sig = NULL; in x509_key_preparse()
187 cert->sig->pkey_algo, cert->sig->hash_algo); in x509_key_preparse()
234 prep->payload.data[asym_auth] = cert->sig; in x509_key_preparse()
242 cert->sig = NULL; in x509_key_preparse()