Lines Matching refs:sinfo
37 struct pkcs7_signed_info *sinfo; /* SignedInfo being constructed */ member
57 static void pkcs7_free_signed_info(struct pkcs7_signed_info *sinfo) in pkcs7_free_signed_info() argument
59 if (sinfo) { in pkcs7_free_signed_info()
60 public_key_signature_free(sinfo->sig); in pkcs7_free_signed_info()
61 kfree(sinfo); in pkcs7_free_signed_info()
72 struct pkcs7_signed_info *sinfo; in pkcs7_free_message() local
86 sinfo = pkcs7->signed_infos; in pkcs7_free_message()
87 pkcs7->signed_infos = sinfo->next; in pkcs7_free_message()
88 pkcs7_free_signed_info(sinfo); in pkcs7_free_message()
100 struct pkcs7_signed_info *sinfo; in pkcs7_check_authattrs() local
103 sinfo = msg->signed_infos; in pkcs7_check_authattrs()
104 if (!sinfo) in pkcs7_check_authattrs()
107 if (sinfo->authattrs) { in pkcs7_check_authattrs()
112 for (sinfo = sinfo->next; sinfo; sinfo = sinfo->next) in pkcs7_check_authattrs()
113 if (!!sinfo->authattrs != want) in pkcs7_check_authattrs()
139 ctx->sinfo = kzalloc(sizeof(struct pkcs7_signed_info), GFP_KERNEL); in pkcs7_parse_message()
140 if (!ctx->sinfo) in pkcs7_parse_message()
142 ctx->sinfo->sig = kzalloc(sizeof(struct public_key_signature), in pkcs7_parse_message()
144 if (!ctx->sinfo->sig) in pkcs7_parse_message()
174 pkcs7_free_signed_info(ctx->sinfo); in pkcs7_parse_message()
243 ctx->sinfo->sig->hash_algo = "md4"; in pkcs7_sig_note_digest_algo()
246 ctx->sinfo->sig->hash_algo = "md5"; in pkcs7_sig_note_digest_algo()
249 ctx->sinfo->sig->hash_algo = "sha1"; in pkcs7_sig_note_digest_algo()
252 ctx->sinfo->sig->hash_algo = "sha256"; in pkcs7_sig_note_digest_algo()
255 ctx->sinfo->sig->hash_algo = "sha384"; in pkcs7_sig_note_digest_algo()
258 ctx->sinfo->sig->hash_algo = "sha512"; in pkcs7_sig_note_digest_algo()
261 ctx->sinfo->sig->hash_algo = "sha224"; in pkcs7_sig_note_digest_algo()
281 ctx->sinfo->sig->pkey_algo = "rsa"; in pkcs7_sig_note_pkey_algo()
282 ctx->sinfo->sig->encoding = "pkcs1"; in pkcs7_sig_note_pkey_algo()
488 struct pkcs7_signed_info *sinfo = ctx->sinfo; local
495 if (__test_and_set_bit(sinfo_has_content_type, &sinfo->aa_set))
500 ctx->msg->data_type, sinfo->index,
507 if (__test_and_set_bit(sinfo_has_signing_time, &sinfo->aa_set))
512 return x509_decode_time(&sinfo->signing_time,
516 if (__test_and_set_bit(sinfo_has_message_digest, &sinfo->aa_set))
520 sinfo->msgdigest = value;
521 sinfo->msgdigest_len = vlen;
525 if (__test_and_set_bit(sinfo_has_smime_caps, &sinfo->aa_set))
545 if (__test_and_set_bit(sinfo_has_ms_opus_info, &sinfo->aa_set))
549 if (__test_and_set_bit(sinfo_has_ms_statement_type, &sinfo->aa_set))
576 struct pkcs7_signed_info *sinfo = ctx->sinfo; local
578 if (!test_bit(sinfo_has_content_type, &sinfo->aa_set) ||
579 !test_bit(sinfo_has_message_digest, &sinfo->aa_set)) {
585 test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set)) {
591 sinfo->authattrs = value - (hdrlen - 1);
592 sinfo->authattrs_len = vlen + (hdrlen - 1);
647 ctx->sinfo->sig->s = kmemdup(value, vlen, GFP_KERNEL);
648 if (!ctx->sinfo->sig->s)
651 ctx->sinfo->sig->s_size = vlen;
663 struct pkcs7_signed_info *sinfo = ctx->sinfo; local
666 if (ctx->msg->data_type == OID_msIndirectData && !sinfo->authattrs) {
687 sinfo->sig->auth_ids[0] = kid;
688 sinfo->index = ++ctx->sinfo_index;
689 *ctx->ppsinfo = sinfo;
690 ctx->ppsinfo = &sinfo->next;
691 ctx->sinfo = kzalloc(sizeof(struct pkcs7_signed_info), GFP_KERNEL);
692 if (!ctx->sinfo)
694 ctx->sinfo->sig = kzalloc(sizeof(struct public_key_signature),
696 if (!ctx->sinfo->sig)