30 if (!crls || !
object) {
38 crls->
length =
object->list.length;
60 if (!ecac || !
object) {
68 ecac->
length =
object->list.length;
71 object->list.objects[
i] =
NULL;
91 if (!dai || !
object) {
99 dai->
length =
object->list.length;
141 if (!iasu || !
object || object->
list.
length != 2) {
175 si->version = (
ut32)elems[0]->sector[0];
182 if (shift < object->
list.length) {
186 if (shift < object->
list.length) {
193 if (shift < object->
list.length) {
213 for (
i = 0;
i < attributes->
length;
i++) {
235 if (!ss || !
object) {
243 ss->
length =
object->list.length;
270 if (!sd || !
object || object->
list.
length < 4) {
291 if (shift < object->
list.length) {
372 if (!attributes || !
object || !object->
list.
length) {
376 attributes->
length =
object->list.length;
377 if (attributes->
length > 0) {
383 for (
i = 0;
i <
object->list.length;
i++) {
412 pad2, last ? last->string :
"Missing",
413 pad2, next ? next->string :
"Missing", pad2);
440 if ((o =
si->issuerAndSerialNumber.serialNumber)) {
446 s =
si->digestAlgorithm.algorithm;
448 pad2, pad3,
s ?
s->string :
"Missing", pad2);
450 for (
i = 0;
i <
si->authenticatedAttributes.length;
i++) {
458 s =
si->digestEncryptionAlgorithm.algorithm;
459 rz_strbuf_appendf(
sb,
"%sDigest Encryption Algorithm\n%s%s\n", pad2, pad3,
s ?
s->string :
"Missing");
467 for (
i = 0;
i <
si->unauthenticatedAttributes.length;
i++) {
524 pj_ki(pj,
"Version",
si->version + 1);
529 if (
si->issuerAndSerialNumber.serialNumber) {
533 pj_ks(pj,
"SerialNumber",
s->string);
538 if (
si->digestAlgorithm.algorithm) {
539 pj_ks(pj,
"DigestAlgorithm",
si->digestAlgorithm.algorithm->string);
541 pj_k(pj,
"AuthenticatedAttributes");
543 for (
i = 0;
i <
si->authenticatedAttributes.length;
i++) {
558 if (
si->digestEncryptionAlgorithm.algorithm) {
559 pj_ks(pj,
"DigestEncryptionAlgorithm",
si->digestEncryptionAlgorithm.algorithm->string);
562 if (
si->encryptedDigest) {
566 pj_ks(pj,
"EncryptedDigest",
s->string);
571 pj_k(pj,
"UnauthenticatedAttributes");
573 for (
i = 0;
i <
si->unauthenticatedAttributes.length;
i++) {
603 pj_k(pj,
"DigestAlgorithms");
616 pj_k(pj,
"Certificates");
630 pj_k(pj,
"SignerInfos");
644 if (!data || !
object || object->
list.
length < 1 ||
662 if (!messageDigest || !
object || object->
list.
length < 2 ||
678 if (
type && strcmp(
type->string,
"spcIndirectDataContext")) {
static RZ_NULLABLE RzILOpBitVector * shift(RzILOpBitVector *val, RZ_NULLABLE RzILOpBool **carry_out, arm_shifter type, RZ_OWN RzILOpBitVector *dist)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
static void list(RzEgg *egg)
void * malloc(size_t size)
void * calloc(size_t number, size_t size)
static void rz_pkcs7_free_spcdata(SpcAttributeTypeAndOptionalValue *data)
void rz_x509_crlentry_dump(RX509CRLEntry *crle, const char *pad, RzStrBuf *sb)
static void rz_pkcs7_free_attributes(RPKCS7Attributes *attributes)
static void rz_pkcs7_free_issuerandserialnumber(RPKCS7IssuerAndSerialNumber *iasu)
static bool rz_pkcs7_parse_attributes(RPKCS7Attributes *attribute, RASN1Object *object)
static void rz_pkcs7_free_signerinfos(RPKCS7SignerInfos *ss)
static RPKCS7Attribute * rz_pkcs7_parse_attribute(RASN1Object *object)
void rz_x509_name_json(PJ *pj, RX509Name *name)
RZ_API RCMS * rz_pkcs7_parse_cms(const ut8 *buffer, ut32 length)
static void rz_pkcs7_free_spcmessagedigest(SpcDigestInfo *messageDigest)
static bool rz_pkcs7_parse_signeddata(RPKCS7SignedData *sd, RASN1Object *object)
RZ_API void rz_pkcs7_free_cms(RCMS *container)
static bool rz_pkcs7_parse_issuerandserialnumber(RPKCS7IssuerAndSerialNumber *iasu, RASN1Object *object)
static void rz_x509_signedinfo_dump(RPKCS7SignerInfo *si, const char *pad, RzStrBuf *sb)
static bool rz_pkcs7_parse_contentinfo(RPKCS7ContentInfo *ci, RASN1Object *object)
RZ_API void rz_x509_signedinfo_json(PJ *pj, RPKCS7SignerInfo *si)
static bool rz_pkcs7_parse_digestalgorithmidentifier(RPKCS7DigestAlgorithmIdentifiers *dai, RASN1Object *object)
RZ_API void rz_pkcs7_free_spcinfo(SpcIndirectDataContent *spcinfo)
static bool rz_pkcs7_parse_signerinfos(RPKCS7SignerInfos *ss, RASN1Object *object)
static void rz_pkcs7_free_signeddata(RPKCS7SignedData *sd)
static bool rz_pkcs7_parse_signerinfo(RPKCS7SignerInfo *si, RASN1Object *object)
static void rz_pkcs7_free_extendedcertificatesandcertificates(RPKCS7ExtendedCertificatesAndCertificates *ecac)
RZ_API char * rz_pkcs7_cms_to_string(RCMS *container)
static bool rz_pkcs7_parse_extendedcertificatesandcertificates(RPKCS7ExtendedCertificatesAndCertificates *ecac, RASN1Object *object)
static void rz_pkcs7_free_contentinfo(RPKCS7ContentInfo *ci)
static void rz_pkcs7_free_attribute(RPKCS7Attribute *attribute)
static void rz_pkcs7_free_digestalgorithmidentifier(RPKCS7DigestAlgorithmIdentifiers *dai)
static bool rz_pkcs7_parse_spcdata(SpcAttributeTypeAndOptionalValue *data, RASN1Object *object)
RZ_API SpcIndirectDataContent * rz_pkcs7_parse_spcinfo(RCMS *cms)
static void rz_pkcs7_free_certificaterevocationlists(RPKCS7CertificateRevocationLists *crls)
static bool rz_pkcs7_parse_certificaterevocationlists(RPKCS7CertificateRevocationLists *crls, RASN1Object *object)
void rz_x509_free_crl(RX509CertificateRevocationList *crl)
static bool rz_pkcs7_parse_spcmessagedigest(SpcDigestInfo *messageDigest, RASN1Object *object)
RZ_API PJ * rz_pkcs7_cms_json(RCMS *container)
static void rz_pkcs7_free_signerinfo(RPKCS7SignerInfo *si)
static void pad(RzStrBuf *sb, ut32 count)
RZ_API void rz_asn1_free_object(RASN1Object *object)
RZ_API void rz_asn1_free_string(RASN1String *string)
RZ_API void rz_asn1_free_binary(RASN1Binary *string)
RZ_API RASN1Binary * rz_asn1_create_binary(const ut8 *buffer, ut32 length)
RZ_API RASN1String * rz_asn1_stringify_integer(const ut8 *buffer, ut32 length)
RZ_API RASN1Object * rz_asn1_create_object(const ut8 *buffer, ut32 length, const ut8 *start_pointer)
RZ_API RASN1String * rz_asn1_stringify_oid(const ut8 *buffer, ut32 length)
#define rz_return_val_if_fail(expr, val)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_s(PJ *j, const char *k)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API void rz_x509_crl_json(PJ *pj, RX509CertificateRevocationList *crl)
RZ_API void rz_x509_free_certificate(RX509Certificate *certificate)
RZ_API RX509CertificateRevocationList * rz_x509_parse_crl(RASN1Object *object)
RZ_API RX509Certificate * rz_x509_parse_certificate(RASN1Object *object)
RZ_API void rz_x509_certificate_dump(RX509Certificate *cert, const char *pad, RzStrBuf *sb)
RZ_API char * rz_x509_crl_to_string(RX509CertificateRevocationList *crl, const char *pad)
RZ_API void rz_x509_certificate_json(PJ *pj, RX509Certificate *certificate)
RX509AlgorithmIdentifier digestAlgorithm
SpcAttributeTypeAndOptionalValue data
SpcDigestInfo messageDigest
struct rz_asn1_object_t ** objects
RPKCS7Attribute ** elements
RX509CertificateRevocationList ** elements
RPKCS7SignedData signedData
RASN1String * contentType
RASN1String * contentType
RX509AlgorithmIdentifier ** elements
RX509Certificate ** elements
RASN1Binary * serialNumber
RPKCS7DigestAlgorithmIdentifiers digestAlgorithms
RPKCS7ExtendedCertificatesAndCertificates certificates
RPKCS7CertificateRevocationLists crls
RPKCS7SignerInfos signerinfos
RPKCS7ContentInfo contentInfo
RPKCS7SignerInfo ** elements
RX509AlgorithmIdentifier signature
RX509CRLEntry ** revokedCertificates
RZ_API void rz_x509_name_dump(RX509Name *name, const char *pad, RzStrBuf *sb)
RZ_API void rz_x509_free_algorithmidentifier(RX509AlgorithmIdentifier *ai)
RZ_API void rz_x509_free_name(RX509Name *name)
RZ_API bool rz_x509_parse_name(RX509Name *name, RASN1Object *object)
RZ_API bool rz_x509_parse_algorithmidentifier(RX509AlgorithmIdentifier *ai, RASN1Object *object)