• Home
  • Raw
  • Download

Lines Matching refs:p7

22 static int PKCS7_type_is_other(PKCS7 *p7)  in PKCS7_type_is_other()  argument
26 int nid = OBJ_obj2nid(p7->type); in PKCS7_type_is_other()
45 static ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7) in PKCS7_get_octet_string() argument
47 if (PKCS7_type_is_data(p7)) in PKCS7_get_octet_string()
48 return p7->d.data; in PKCS7_get_octet_string()
49 if (PKCS7_type_is_other(p7) && p7->d.other in PKCS7_get_octet_string()
50 && (p7->d.other->type == V_ASN1_OCTET_STRING)) in PKCS7_get_octet_string()
51 return p7->d.other->value.octet_string; in PKCS7_get_octet_string()
196 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) in PKCS7_dataInit() argument
208 if (p7 == NULL) { in PKCS7_dataInit()
222 if (p7->d.ptr == NULL) { in PKCS7_dataInit()
227 i = OBJ_obj2nid(p7->type); in PKCS7_dataInit()
228 p7->state = PKCS7_S_HEADER; in PKCS7_dataInit()
232 md_sk = p7->d.sign->md_algs; in PKCS7_dataInit()
233 os = PKCS7_get_octet_string(p7->d.sign->contents); in PKCS7_dataInit()
236 rsk = p7->d.signed_and_enveloped->recipientinfo; in PKCS7_dataInit()
237 md_sk = p7->d.signed_and_enveloped->md_algs; in PKCS7_dataInit()
238 xalg = p7->d.signed_and_enveloped->enc_data->algorithm; in PKCS7_dataInit()
239 evp_cipher = p7->d.signed_and_enveloped->enc_data->cipher; in PKCS7_dataInit()
246 rsk = p7->d.enveloped->recipientinfo; in PKCS7_dataInit()
247 xalg = p7->d.enveloped->enc_data->algorithm; in PKCS7_dataInit()
248 evp_cipher = p7->d.enveloped->enc_data->cipher; in PKCS7_dataInit()
255 xa = p7->d.digest->md; in PKCS7_dataInit()
256 os = PKCS7_get_octet_string(p7->d.digest->contents); in PKCS7_dataInit()
322 if (PKCS7_is_detached(p7)) { in PKCS7_dataInit()
359 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) in PKCS7_dataDecode() argument
375 if (p7 == NULL) { in PKCS7_dataDecode()
380 if (p7->d.ptr == NULL) { in PKCS7_dataDecode()
385 i = OBJ_obj2nid(p7->type); in PKCS7_dataDecode()
386 p7->state = PKCS7_S_HEADER; in PKCS7_dataDecode()
396 data_body = PKCS7_get_octet_string(p7->d.sign->contents); in PKCS7_dataDecode()
397 if (!PKCS7_is_detached(p7) && data_body == NULL) { in PKCS7_dataDecode()
402 md_sk = p7->d.sign->md_algs; in PKCS7_dataDecode()
405 rsk = p7->d.signed_and_enveloped->recipientinfo; in PKCS7_dataDecode()
406 md_sk = p7->d.signed_and_enveloped->md_algs; in PKCS7_dataDecode()
408 data_body = p7->d.signed_and_enveloped->enc_data->enc_data; in PKCS7_dataDecode()
409 enc_alg = p7->d.signed_and_enveloped->enc_data->algorithm; in PKCS7_dataDecode()
418 rsk = p7->d.enveloped->recipientinfo; in PKCS7_dataDecode()
419 enc_alg = p7->d.enveloped->enc_data->algorithm; in PKCS7_dataDecode()
421 data_body = p7->d.enveloped->enc_data->enc_data; in PKCS7_dataDecode()
645 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) in PKCS7_dataFinal() argument
656 if (p7 == NULL) { in PKCS7_dataFinal()
661 if (p7->d.ptr == NULL) { in PKCS7_dataFinal()
672 i = OBJ_obj2nid(p7->type); in PKCS7_dataFinal()
673 p7->state = PKCS7_S_HEADER; in PKCS7_dataFinal()
677 os = p7->d.data; in PKCS7_dataFinal()
681 si_sk = p7->d.signed_and_enveloped->signer_info; in PKCS7_dataFinal()
682 os = p7->d.signed_and_enveloped->enc_data->enc_data; in PKCS7_dataFinal()
689 p7->d.signed_and_enveloped->enc_data->enc_data = os; in PKCS7_dataFinal()
694 os = p7->d.enveloped->enc_data->enc_data; in PKCS7_dataFinal()
701 p7->d.enveloped->enc_data->enc_data = os; in PKCS7_dataFinal()
705 si_sk = p7->d.sign->signer_info; in PKCS7_dataFinal()
706 os = PKCS7_get_octet_string(p7->d.sign->contents); in PKCS7_dataFinal()
708 if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { in PKCS7_dataFinal()
711 p7->d.sign->contents->d.data = NULL; in PKCS7_dataFinal()
716 os = PKCS7_get_octet_string(p7->d.digest->contents); in PKCS7_dataFinal()
718 if (PKCS7_type_is_data(p7->d.digest->contents) && p7->detached) { in PKCS7_dataFinal()
721 p7->d.digest->contents->d.data = NULL; in PKCS7_dataFinal()
780 OBJ_obj2nid(p7->d.digest->md->algorithm))) in PKCS7_dataFinal()
784 if (!ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len)) in PKCS7_dataFinal()
788 if (!PKCS7_is_detached(p7)) { in PKCS7_dataFinal()
883 PKCS7 *p7, PKCS7_SIGNER_INFO *si) in PKCS7_dataVerify() argument
890 if (p7 == NULL) { in PKCS7_dataVerify()
895 if (p7->d.ptr == NULL) { in PKCS7_dataVerify()
900 if (PKCS7_type_is_signed(p7)) { in PKCS7_dataVerify()
901 cert = p7->d.sign->cert; in PKCS7_dataVerify()
902 } else if (PKCS7_type_is_signedAndEnveloped(p7)) { in PKCS7_dataVerify()
903 cert = p7->d.signed_and_enveloped->cert; in PKCS7_dataVerify()
934 return PKCS7_signatureVerify(bio, p7, si, x509); in PKCS7_dataVerify()
939 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, in PKCS7_signatureVerify() argument
956 if (!PKCS7_type_is_signed(p7) && !PKCS7_type_is_signedAndEnveloped(p7)) { in PKCS7_signatureVerify()
1051 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx) in PKCS7_get_issuer_and_serial() argument
1057 i = OBJ_obj2nid(p7->type); in PKCS7_get_issuer_and_serial()
1060 if (p7->d.signed_and_enveloped == NULL) in PKCS7_get_issuer_and_serial()
1062 rsk = p7->d.signed_and_enveloped->recipientinfo; in PKCS7_get_issuer_and_serial()