Lines Matching refs:sig
254 static int cert_sig_digest_update(const struct public_key_signature *sig, in cert_sig_digest_update() argument
263 BUG_ON(!sig->data); in cert_sig_digest_update()
270 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in cert_sig_digest_update()
291 ret = crypto_shash_finup(desc, sig->data, sig->data_size, sig->digest); in cert_sig_digest_update()
301 const struct public_key_signature *sig, in cert_sig_digest_update() argument
312 const struct public_key_signature *sig) in public_key_verify_signature() argument
325 BUG_ON(!sig); in public_key_verify_signature()
326 BUG_ON(!sig->s); in public_key_verify_signature()
328 ret = software_key_determine_akcipher(sig->encoding, in public_key_verify_signature()
329 sig->hash_algo, in public_key_verify_signature()
361 if (sig->pkey_algo && strcmp(sig->pkey_algo, "sm2") == 0 && in public_key_verify_signature()
362 sig->data_size) { in public_key_verify_signature()
363 ret = cert_sig_digest_update(sig, tfm); in public_key_verify_signature()
369 sg_set_buf(&src_sg[0], sig->s, sig->s_size); in public_key_verify_signature()
370 sg_set_buf(&src_sg[1], sig->digest, sig->digest_size); in public_key_verify_signature()
371 akcipher_request_set_crypt(req, src_sg, NULL, sig->s_size, in public_key_verify_signature()
372 sig->digest_size); in public_key_verify_signature()
393 const struct public_key_signature *sig) in public_key_verify_signature_2() argument
396 return public_key_verify_signature(pk, sig); in public_key_verify_signature_2()