Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Definition at line 592 of file pkcs7.c.
References rz_x509_algorithmidentifier_t::algorithm, rz_pkcs7_signeddata_t::certificates, rz_pkcs7_signeddata_t::crls, rz_pkcs7_signeddata_t::digestAlgorithms, rz_pkcs7_certificaterevocationlists_t::elements, rz_pkcs7_extendedcertificatesandcertificates_t::elements, rz_pkcs7_digestalgorithmidentifiers_t::elements, rz_pkcs7_signerinfos_t::elements, i, rz_pkcs7_certificaterevocationlists_t::length, rz_pkcs7_extendedcertificatesandcertificates_t::length, rz_pkcs7_digestalgorithmidentifiers_t::length, rz_pkcs7_signerinfos_t::length, NULL, pj_a(), pj_end(), pj_k(), pj_kn(), pj_new(), pj_o(), pj_s(), rz_x509_certificate_json(), rz_x509_crl_json(), rz_x509_signedinfo_json(), s, rz_pkcs7_container_t::signedData, rz_pkcs7_signeddata_t::signerinfos, and rz_pkcs7_signeddata_t::version.
Referenced by signature().
Definition at line 479 of file pkcs7.c.
References rz_x509_algorithmidentifier_t::algorithm, rz_pkcs7_signeddata_t::certificates, rz_pkcs7_signeddata_t::crls, rz_pkcs7_signeddata_t::digestAlgorithms, rz_pkcs7_certificaterevocationlists_t::elements, rz_pkcs7_extendedcertificatesandcertificates_t::elements, rz_pkcs7_digestalgorithmidentifiers_t::elements, rz_pkcs7_signerinfos_t::elements, free(), i, rz_pkcs7_certificaterevocationlists_t::length, rz_pkcs7_extendedcertificatesandcertificates_t::length, rz_pkcs7_digestalgorithmidentifiers_t::length, rz_pkcs7_signerinfos_t::length, NULL, rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_new(), rz_x509_certificate_dump(), rz_x509_crl_to_string(), rz_x509_signedinfo_dump(), s, sb, rz_pkcs7_container_t::signedData, rz_pkcs7_signeddata_t::signerinfos, and rz_pkcs7_signeddata_t::version.
Referenced by cmd_print_fromage(), and signature().
|
static |
Definition at line 202 of file pkcs7.c.
References rz_pkcs7_attribute_t::data, free(), rz_pkcs7_attribute_t::oid, rz_asn1_free_binary(), and rz_asn1_free_string().
Referenced by rz_pkcs7_free_attributes().
|
static |
Definition at line 210 of file pkcs7.c.
References rz_pkcs7_attributes_t::elements, i, rz_pkcs7_attributes_t::length, RZ_FREE, and rz_pkcs7_free_attribute().
Referenced by rz_pkcs7_free_signerinfo().
|
static |
Definition at line 46 of file pkcs7.c.
References rz_pkcs7_certificaterevocationlists_t::elements, i, rz_pkcs7_certificaterevocationlists_t::length, NULL, RZ_FREE, and rz_x509_free_crl().
Referenced by rz_pkcs7_free_signeddata().
Definition at line 341 of file pkcs7.c.
References rz_pkcs7_container_t::contentType, free(), rz_asn1_free_string(), rz_pkcs7_free_signeddata(), and rz_pkcs7_container_t::signedData.
Referenced by cmd_print_fromage(), and rz_bin_pe_free().
|
static |
Definition at line 132 of file pkcs7.c.
References rz_pkcs7_contentinfo_t::content, rz_pkcs7_contentinfo_t::contentType, rz_asn1_free_binary(), and rz_asn1_free_string().
Referenced by rz_pkcs7_free_signeddata().
|
static |
Definition at line 116 of file pkcs7.c.
References rz_pkcs7_digestalgorithmidentifiers_t::elements, i, rz_pkcs7_digestalgorithmidentifiers_t::length, RZ_FREE, and rz_x509_free_algorithmidentifier().
Referenced by rz_pkcs7_free_signeddata().
|
static |
Definition at line 77 of file pkcs7.c.
References rz_pkcs7_extendedcertificatesandcertificates_t::elements, i, rz_pkcs7_extendedcertificatesandcertificates_t::length, NULL, RZ_FREE, and rz_x509_free_certificate().
Referenced by rz_pkcs7_free_signeddata().
|
static |
Definition at line 152 of file pkcs7.c.
References rz_pkcs7_issuerandserialnumber_t::issuer, rz_asn1_free_binary(), rz_x509_free_name(), and rz_pkcs7_issuerandserialnumber_t::serialNumber.
Referenced by rz_pkcs7_free_signerinfo().
|
static |
Definition at line 297 of file pkcs7.c.
References rz_pkcs7_signeddata_t::certificates, rz_pkcs7_signeddata_t::contentInfo, rz_pkcs7_signeddata_t::crls, rz_pkcs7_signeddata_t::digestAlgorithms, rz_pkcs7_free_certificaterevocationlists(), rz_pkcs7_free_contentinfo(), rz_pkcs7_free_digestalgorithmidentifier(), rz_pkcs7_free_extendedcertificatesandcertificates(), rz_pkcs7_free_signerinfos(), and rz_pkcs7_signeddata_t::signerinfos.
Referenced by rz_pkcs7_free_cms().
|
static |
Definition at line 221 of file pkcs7.c.
References free(), rz_asn1_free_binary(), rz_pkcs7_free_attributes(), rz_pkcs7_free_issuerandserialnumber(), rz_x509_free_algorithmidentifier(), and si.
Referenced by rz_pkcs7_free_signerinfos().
|
static |
Definition at line 256 of file pkcs7.c.
References rz_pkcs7_signerinfos_t::elements, i, rz_pkcs7_signerinfos_t::length, NULL, RZ_FREE, and rz_pkcs7_free_signerinfo().
Referenced by rz_pkcs7_free_signeddata().
|
static |
Definition at line 715 of file pkcs7.c.
References SpcAttributeTypeAndOptionalValue::data, rz_asn1_free_binary(), rz_asn1_free_string(), and SpcAttributeTypeAndOptionalValue::type.
Referenced by rz_pkcs7_free_spcinfo().
RZ_API void rz_pkcs7_free_spcinfo | ( | SpcIndirectDataContent * | spcinfo | ) |
Definition at line 729 of file pkcs7.c.
References SpcIndirectDataContent::data, SpcIndirectDataContent::messageDigest, rz_pkcs7_free_spcdata(), and rz_pkcs7_free_spcmessagedigest().
Referenced by rz_bin_pe_free().
|
static |
Definition at line 722 of file pkcs7.c.
References SpcDigestInfo::digest, SpcDigestInfo::digestAlgorithm, rz_asn1_free_binary(), and rz_x509_free_algorithmidentifier().
Referenced by rz_pkcs7_free_spcinfo().
|
static |
Definition at line 349 of file pkcs7.c.
References rz_pkcs7_attribute_t::data, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, NULL, rz_asn1_list_t::objects, rz_pkcs7_attribute_t::oid, rz_asn1_create_binary(), rz_asn1_stringify_oid(), RZ_NEW0, and rz_asn1_object_t::sector.
Referenced by rz_pkcs7_parse_attributes().
|
static |
Definition at line 370 of file pkcs7.c.
References rz_pkcs7_attributes_t::elements, i, rz_asn1_list_t::length, rz_pkcs7_attributes_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, RZ_NEWS0, and rz_pkcs7_parse_attribute().
Referenced by rz_pkcs7_parse_signerinfo().
|
static |
Definition at line 28 of file pkcs7.c.
References calloc(), rz_pkcs7_certificaterevocationlists_t::elements, i, rz_asn1_list_t::length, rz_pkcs7_certificaterevocationlists_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, and rz_x509_parse_crl().
Referenced by rz_pkcs7_parse_signeddata().
Definition at line 308 of file pkcs7.c.
References rz_pkcs7_container_t::contentType, free(), rz_asn1_list_t::length, rz_asn1_object_t::length, length, rz_asn1_object_t::list, NULL, rz_asn1_list_t::objects, rz_asn1_create_object(), rz_asn1_free_object(), rz_asn1_stringify_oid(), RZ_NEW0, rz_pkcs7_parse_signeddata(), rz_asn1_object_t::sector, and rz_pkcs7_container_t::signedData.
Referenced by bin_pe_init_security(), and cmd_print_fromage().
|
static |
Definition at line 14 of file pkcs7.c.
References rz_pkcs7_contentinfo_t::content, rz_pkcs7_contentinfo_t::contentType, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, rz_asn1_create_binary(), rz_asn1_stringify_oid(), and rz_asn1_object_t::sector.
Referenced by rz_pkcs7_parse_signeddata().
|
static |
Definition at line 89 of file pkcs7.c.
References calloc(), rz_pkcs7_digestalgorithmidentifiers_t::elements, i, rz_asn1_list_t::length, rz_pkcs7_digestalgorithmidentifiers_t::length, rz_asn1_object_t::list, malloc(), memset(), rz_asn1_list_t::objects, and rz_x509_parse_algorithmidentifier().
Referenced by rz_pkcs7_parse_signeddata().
|
static |
Definition at line 58 of file pkcs7.c.
References calloc(), rz_pkcs7_extendedcertificatesandcertificates_t::elements, i, rz_asn1_list_t::length, rz_pkcs7_extendedcertificatesandcertificates_t::length, rz_asn1_object_t::list, NULL, rz_asn1_list_t::objects, and rz_x509_parse_certificate().
Referenced by rz_pkcs7_parse_signeddata().
|
static |
Definition at line 140 of file pkcs7.c.
References rz_pkcs7_issuerandserialnumber_t::issuer, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, rz_asn1_create_binary(), rz_x509_parse_name(), rz_asn1_object_t::sector, and rz_pkcs7_issuerandserialnumber_t::serialNumber.
Referenced by rz_pkcs7_parse_signerinfo().
|
static |
Definition at line 268 of file pkcs7.c.
References rz_pkcs7_signeddata_t::certificates, CLASS_CONTEXT, rz_pkcs7_signeddata_t::contentInfo, rz_pkcs7_signeddata_t::crls, rz_pkcs7_signeddata_t::digestAlgorithms, rz_asn1_object_t::klass, rz_asn1_list_t::length, rz_asn1_object_t::list, list(), memset(), rz_asn1_list_t::objects, rz_pkcs7_parse_certificaterevocationlists(), rz_pkcs7_parse_contentinfo(), rz_pkcs7_parse_digestalgorithmidentifier(), rz_pkcs7_parse_extendedcertificatesandcertificates(), rz_pkcs7_parse_signerinfos(), shift(), rz_pkcs7_signeddata_t::signerinfos, rz_asn1_object_t::tag, and rz_pkcs7_signeddata_t::version.
Referenced by rz_pkcs7_parse_cms().
|
static |
Definition at line 167 of file pkcs7.c.
References CLASS_CONTEXT, rz_asn1_object_t::klass, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, list(), rz_asn1_list_t::objects, rz_asn1_create_binary(), rz_pkcs7_parse_attributes(), rz_pkcs7_parse_issuerandserialnumber(), rz_x509_parse_algorithmidentifier(), rz_asn1_object_t::sector, shift(), si, and rz_asn1_object_t::tag.
Referenced by rz_pkcs7_parse_signerinfos().
|
static |
Definition at line 233 of file pkcs7.c.
References calloc(), rz_pkcs7_signerinfos_t::elements, i, rz_asn1_list_t::length, rz_pkcs7_signerinfos_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, RZ_NEW0, and rz_pkcs7_parse_signerinfo().
Referenced by rz_pkcs7_parse_signeddata().
|
static |
Definition at line 643 of file pkcs7.c.
References SpcAttributeTypeAndOptionalValue::data, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, rz_asn1_create_binary(), rz_asn1_stringify_oid(), rz_asn1_object_t::sector, and SpcAttributeTypeAndOptionalValue::type.
Referenced by rz_pkcs7_parse_spcinfo().
RZ_API SpcIndirectDataContent* rz_pkcs7_parse_spcinfo | ( | RCMS * | cms | ) |
Definition at line 674 of file pkcs7.c.
References rz_asn1_bin_t::binary, rz_pkcs7_contentinfo_t::content, rz_pkcs7_signeddata_t::contentInfo, rz_pkcs7_contentinfo_t::contentType, SpcIndirectDataContent::data, free(), rz_asn1_list_t::length, rz_asn1_bin_t::length, rz_asn1_object_t::list, SpcIndirectDataContent::messageDigest, NULL, rz_asn1_list_t::objects, rz_asn1_create_object(), rz_asn1_free_object(), RZ_FREE, RZ_NEW0, rz_pkcs7_parse_spcdata(), rz_pkcs7_parse_spcmessagedigest(), rz_return_val_if_fail, rz_pkcs7_container_t::signedData, and type.
Referenced by bin_pe_init_security().
|
static |
Definition at line 661 of file pkcs7.c.
References SpcDigestInfo::digest, SpcDigestInfo::digestAlgorithm, rz_asn1_list_t::length, rz_asn1_object_t::length, rz_asn1_object_t::list, rz_asn1_list_t::objects, rz_asn1_create_binary(), rz_x509_parse_algorithmidentifier(), and rz_asn1_object_t::sector.
Referenced by rz_pkcs7_parse_spcinfo().
void rz_x509_crlentry_dump | ( | RX509CRLEntry * | crle, |
const char * | pad, | ||
RzStrBuf * | sb | ||
) |
Definition at line 573 of file x509.c.
References rz_asn1_bin_t::binary, id, rz_asn1_bin_t::length, NULL, pad(), rz_x509_crlentry::revocationDate, rz_asn1_free_string(), rz_asn1_stringify_integer(), rz_strbuf_appendf(), sb, and rz_x509_crlentry::userCertificate.
Referenced by rz_x509_crl_to_string().
void rz_x509_free_crl | ( | RX509CertificateRevocationList * | crl | ) |
Definition at line 404 of file x509.c.
References free(), i, rz_x509_certificaterevocationlist::issuer, rz_x509_certificaterevocationlist::lastUpdate, rz_x509_certificaterevocationlist::length, rz_x509_certificaterevocationlist::nextUpdate, NULL, rz_x509_certificaterevocationlist::revokedCertificates, rz_asn1_free_string(), RZ_FREE, rz_x509_free_algorithmidentifier(), rz_x509_free_crlentry(), rz_x509_free_name(), and rz_x509_certificaterevocationlist::signature.
Referenced by rz_pkcs7_free_certificaterevocationlists().
Definition at line 638 of file x509.c.
Referenced by rz_x509_crl_json(), rz_x509_signedinfo_json(), and rz_x509_tbscertificate_json().
|
static |
Definition at line 421 of file pkcs7.c.
References rz_asn1_bin_t::binary, rz_pkcs7_attribute_t::data, eprintf, free(), i, rz_asn1_bin_t::length, NULL, rz_pkcs7_attribute_t::oid, pad(), rz_asn1_free_string(), rz_asn1_stringify_integer(), rz_str_newf(), rz_strbuf_appendf(), rz_x509_name_dump(), s, sb, si, and rz_asn1_string_t::string.
Referenced by rz_pkcs7_cms_to_string().
RZ_API void rz_x509_signedinfo_json | ( | PJ * | pj, |
RPKCS7SignerInfo * | si | ||
) |
Definition at line 520 of file pkcs7.c.
References rz_asn1_bin_t::binary, rz_pkcs7_attribute_t::data, i, rz_asn1_bin_t::length, rz_pkcs7_attribute_t::oid, pj_a(), pj_end(), pj_k(), pj_ki(), pj_ks(), pj_o(), rz_asn1_free_string(), rz_asn1_stringify_integer(), rz_x509_name_json(), s, si, and rz_asn1_string_t::string.
Referenced by rz_pkcs7_cms_json().