Lines Matching refs:sinfo
25 struct pkcs7_signed_info *sinfo; /* SignedInfo being constructed */ member
45 static void pkcs7_free_signed_info(struct pkcs7_signed_info *sinfo) in pkcs7_free_signed_info() argument
47 if (sinfo) { in pkcs7_free_signed_info()
48 public_key_signature_free(sinfo->sig); in pkcs7_free_signed_info()
49 kfree(sinfo); in pkcs7_free_signed_info()
60 struct pkcs7_signed_info *sinfo; in pkcs7_free_message() local
74 sinfo = pkcs7->signed_infos; in pkcs7_free_message()
75 pkcs7->signed_infos = sinfo->next; in pkcs7_free_message()
76 pkcs7_free_signed_info(sinfo); in pkcs7_free_message()
88 struct pkcs7_signed_info *sinfo; in pkcs7_check_authattrs() local
91 sinfo = msg->signed_infos; in pkcs7_check_authattrs()
92 if (!sinfo) in pkcs7_check_authattrs()
95 if (sinfo->authattrs) { in pkcs7_check_authattrs()
100 for (sinfo = sinfo->next; sinfo; sinfo = sinfo->next) in pkcs7_check_authattrs()
101 if (!!sinfo->authattrs != want) in pkcs7_check_authattrs()
127 ctx->sinfo = kzalloc(sizeof(struct pkcs7_signed_info), GFP_KERNEL); in pkcs7_parse_message()
128 if (!ctx->sinfo) in pkcs7_parse_message()
130 ctx->sinfo->sig = kzalloc(sizeof(struct public_key_signature), in pkcs7_parse_message()
132 if (!ctx->sinfo->sig) in pkcs7_parse_message()
162 pkcs7_free_signed_info(ctx->sinfo); in pkcs7_parse_message()
231 ctx->sinfo->sig->hash_algo = "md4"; in pkcs7_sig_note_digest_algo()
234 ctx->sinfo->sig->hash_algo = "md5"; in pkcs7_sig_note_digest_algo()
237 ctx->sinfo->sig->hash_algo = "sha1"; in pkcs7_sig_note_digest_algo()
240 ctx->sinfo->sig->hash_algo = "sha256"; in pkcs7_sig_note_digest_algo()
243 ctx->sinfo->sig->hash_algo = "sha384"; in pkcs7_sig_note_digest_algo()
246 ctx->sinfo->sig->hash_algo = "sha512"; in pkcs7_sig_note_digest_algo()
249 ctx->sinfo->sig->hash_algo = "sha224"; in pkcs7_sig_note_digest_algo()
252 ctx->sinfo->sig->hash_algo = "sm3"; in pkcs7_sig_note_digest_algo()
255 ctx->sinfo->sig->hash_algo = "streebog256"; in pkcs7_sig_note_digest_algo()
258 ctx->sinfo->sig->hash_algo = "streebog512"; in pkcs7_sig_note_digest_algo()
278 ctx->sinfo->sig->pkey_algo = "rsa"; in pkcs7_sig_note_pkey_algo()
279 ctx->sinfo->sig->encoding = "pkcs1"; in pkcs7_sig_note_pkey_algo()
286 ctx->sinfo->sig->pkey_algo = "ecdsa"; in pkcs7_sig_note_pkey_algo()
287 ctx->sinfo->sig->encoding = "x962"; in pkcs7_sig_note_pkey_algo()
290 ctx->sinfo->sig->pkey_algo = "sm2"; in pkcs7_sig_note_pkey_algo()
291 ctx->sinfo->sig->encoding = "raw"; in pkcs7_sig_note_pkey_algo()
295 ctx->sinfo->sig->pkey_algo = "ecrdsa"; in pkcs7_sig_note_pkey_algo()
296 ctx->sinfo->sig->encoding = "raw"; in pkcs7_sig_note_pkey_algo()
502 struct pkcs7_signed_info *sinfo = ctx->sinfo; in pkcs7_sig_note_authenticated_attr() local
509 if (__test_and_set_bit(sinfo_has_content_type, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
514 ctx->msg->data_type, sinfo->index, in pkcs7_sig_note_authenticated_attr()
521 if (__test_and_set_bit(sinfo_has_signing_time, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
526 return x509_decode_time(&sinfo->signing_time, in pkcs7_sig_note_authenticated_attr()
530 if (__test_and_set_bit(sinfo_has_message_digest, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
534 sinfo->msgdigest = value; in pkcs7_sig_note_authenticated_attr()
535 sinfo->msgdigest_len = vlen; in pkcs7_sig_note_authenticated_attr()
539 if (__test_and_set_bit(sinfo_has_smime_caps, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
554 if (__test_and_set_bit(sinfo_has_ms_opus_info, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
558 if (__test_and_set_bit(sinfo_has_ms_statement_type, &sinfo->aa_set)) in pkcs7_sig_note_authenticated_attr()
585 struct pkcs7_signed_info *sinfo = ctx->sinfo; in pkcs7_sig_note_set_of_authattrs() local
587 if (!test_bit(sinfo_has_content_type, &sinfo->aa_set) || in pkcs7_sig_note_set_of_authattrs()
588 !test_bit(sinfo_has_message_digest, &sinfo->aa_set)) { in pkcs7_sig_note_set_of_authattrs()
594 test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set)) { in pkcs7_sig_note_set_of_authattrs()
600 sinfo->authattrs = value - (hdrlen - 1); in pkcs7_sig_note_set_of_authattrs()
601 sinfo->authattrs_len = vlen + (hdrlen - 1); in pkcs7_sig_note_set_of_authattrs()
656 ctx->sinfo->sig->s = kmemdup(value, vlen, GFP_KERNEL); in pkcs7_sig_note_signature()
657 if (!ctx->sinfo->sig->s) in pkcs7_sig_note_signature()
660 ctx->sinfo->sig->s_size = vlen; in pkcs7_sig_note_signature()
672 struct pkcs7_signed_info *sinfo = ctx->sinfo; in pkcs7_note_signed_info() local
675 if (ctx->msg->data_type == OID_msIndirectData && !sinfo->authattrs) { in pkcs7_note_signed_info()
696 sinfo->sig->auth_ids[0] = kid; in pkcs7_note_signed_info()
697 sinfo->index = ++ctx->sinfo_index; in pkcs7_note_signed_info()
698 *ctx->ppsinfo = sinfo; in pkcs7_note_signed_info()
699 ctx->ppsinfo = &sinfo->next; in pkcs7_note_signed_info()
700 ctx->sinfo = kzalloc(sizeof(struct pkcs7_signed_info), GFP_KERNEL); in pkcs7_note_signed_info()
701 if (!ctx->sinfo) in pkcs7_note_signed_info()
703 ctx->sinfo->sig = kzalloc(sizeof(struct public_key_signature), in pkcs7_note_signed_info()
705 if (!ctx->sinfo->sig) in pkcs7_note_signed_info()