12 if (!validity || !
object || object->
list.
length != 2) {
39 return object->list.objects[0] &&
41 object->list.objects[0]->tag ==
TAG_OID;
59 if (!spki || !
object || object->
list.
length != 2) {
85 name->length =
object->list.length;
97 for (
i = 0;
i <
object->list.length;
i++) {
148 object =
object->list.objects[0];
150 if (!
ext->extensions) {
153 ext->length =
object->list.length;
154 for (
i = 0;
i <
object->list.length;
i++) {
168 if (!tbsc || !
object || object->
list.
length < 6) {
173 if (elems[0]->
list.length == 1 &&
193 for (
i =
shift + 6;
i <
object->list.length;
i++) {
197 if (elems[
i]->
tag == 1) {
203 if (elems[
i]->
tag == 2) {
298 crl->
length =
object->list.objects[4]->list.length;
299 for (
i = 0;
i <
object->list.objects[4]->list.length;
i++) {
328 for (
i = 0;
i <
name->length;
i++) {
352 if (
ex->extensions) {
353 for (
i = 0;
i <
ex->length;
i++) {
442 for (
i = 0;
i <
name->length;
i++) {
488 e->extnID ?
e->extnID->string :
"Missing",
489 e->critical ?
"critical" :
"",
490 pad,
e->extnValue ?
e->extnValue->length : 0);
508 "%sSerial Number:\n%s %s\n"
509 "%sSignature Algorithm:\n%s %s\n"
586 "%sRevocation Date:\n%s %s\n",
587 pad,
pad,
id ?
id->string :
"Missing",
588 pad,
pad, utc ? utc->string :
"Missing");
612 algo ? algo->
string :
"", pad2);
616 pad2, last ? last->string :
"Missing",
617 pad2, next ? next->string :
"Missing", pad2);
640 for (
i = 0;
i <
name->length;
i++) {
657 pj_ks(pj,
"Module",
m->string);
664 pj_ks(pj,
"Exponent",
m->string);
683 pj_ks(pj,
"OID",
e->extnID->string);
686 pj_kb(pj,
"Critical",
e->critical);
692 pj_ks(pj,
"Value",
m->string);
709 pj_ks(pj,
"UserCertificate",
m->string);
735 pj_k(pj,
"RevokedCertificates");
759 pj_k(pj,
"Validity");
767 pj_k(pj,
"SubjectPublicKeyInfo");
774 pj_ks(pj,
"IssuerUniqueID",
m->string);
781 pj_ks(pj,
"SubjectUniqueID",
m->string);
785 pj_k(pj,
"Extensions");
796 pj_k(pj,
"TBSCertificate");
804 pj_ks(pj,
"Signature",
m->string);
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 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 RASN1String * rz_asn1_stringify_time(const ut8 *buffer, ut32 length)
#define TAG_GENERALIZEDTIME
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_utctime(const ut8 *buffer, ut32 length)
RZ_API RASN1String * rz_asn1_stringify_oid(const ut8 *buffer, ut32 length)
RZ_API RASN1String * rz_asn1_stringify_string(const ut8 *buffer, ut32 length)
#define rz_return_val_if_fail(expr, val)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
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_ks(PJ *j, const char *k, const char *v)
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 RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
struct rz_asn1_object_t ** objects
RX509TBSCertificate tbsCertificate
RX509AlgorithmIdentifier algorithmIdentifier
RX509AlgorithmIdentifier signature
RX509CRLEntry ** revokedCertificates
RASN1Binary * userCertificate
RASN1String * revocationDate
RX509Extension ** extensions
RX509AlgorithmIdentifier algorithm
RASN1Binary * subjectPublicKeyExponent
RASN1Binary * subjectPublicKey
RASN1Binary * subjectPublicKeyModule
RX509SubjectPublicKeyInfo subjectPublicKeyInfo
RASN1String * serialNumber
RASN1Binary * subjectUniqueID
RX509AlgorithmIdentifier signature
RASN1Binary * issuerUniqueID
RX509Extensions extensions
RZ_API void rz_x509_crl_json(PJ *pj, RX509CertificateRevocationList *crl)
RZ_API RX509Certificate * rz_x509_parse_certificate2(const ut8 *buffer, ut32 length)
void rz_x509_crlentry_dump(RX509CRLEntry *crle, const char *pad, RzStrBuf *sb)
RZ_API void rz_x509_crlentry_json(PJ *pj, RX509CRLEntry *crle)
RZ_API void rz_x509_free_certificate(RX509Certificate *certificate)
RZ_API RX509CertificateRevocationList * rz_x509_parse_crl(RASN1Object *object)
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_name_json(PJ *pj, RX509Name *name)
RZ_API void rz_x509_extensions_json(PJ *pj, RX509Extensions *exts)
static void rz_x509_free_crlentry(RX509CRLEntry *entry)
RZ_API void rz_x509_free_subjectpublickeyinfo(RX509SubjectPublicKeyInfo *spki)
RZ_API void rz_x509_free_extensions(RX509Extensions *ex)
static void rz_x509_subjectpublickeyinfo_dump(RX509SubjectPublicKeyInfo *spki, const char *pad, RzStrBuf *sb)
RZ_API void rz_x509_free_name(RX509Name *name)
RZ_API bool rz_x509_parse_subjectpublickeyinfo(RX509SubjectPublicKeyInfo *spki, RASN1Object *object)
RZ_API bool rz_x509_parse_extensions(RX509Extensions *ext, RASN1Object *object)
static void rz_x509_free_validity(RX509Validity *validity)
RZ_API bool rz_x509_parse_tbscertificate(RX509TBSCertificate *tbsc, RASN1Object *object)
static bool is_oid_object(RASN1Object *object)
RZ_API void rz_x509_free_extension(RX509Extension *ex)
RZ_API RX509Certificate * rz_x509_parse_certificate(RASN1Object *object)
static void rz_x509_extensions_dump(RX509Extensions *exts, const char *pad, RzStrBuf *sb)
RZ_API void rz_x509_certificate_dump(RX509Certificate *cert, const char *pad, RzStrBuf *sb)
static void rz_x509_tbscertificate_dump(RX509TBSCertificate *tbsc, const char *pad, RzStrBuf *sb)
RZ_API bool rz_x509_parse_name(RX509Name *name, RASN1Object *object)
RZ_API void rz_x509_subjectpublickeyinfo_json(PJ *pj, RX509SubjectPublicKeyInfo *spki)
static void rz_x509_validity_dump(RX509Validity *validity, const char *pad, RzStrBuf *sb)
RZ_API char * rz_x509_crl_to_string(RX509CertificateRevocationList *crl, const char *pad)
static bool rz_x509_parse_validity(RX509Validity *validity, RASN1Object *object)
RZ_API bool rz_x509_parse_extension(RX509Extension *ext, RASN1Object *object)
RZ_API void rz_x509_free_tbscertificate(RX509TBSCertificate *tbsc)
RZ_API RX509CRLEntry * rz_x509_parse_crlentry(RASN1Object *object)
RZ_API void rz_x509_certificate_json(PJ *pj, RX509Certificate *certificate)
RZ_API void rz_x509_validity_json(PJ *pj, RX509Validity *validity)
void rz_x509_free_crl(RX509CertificateRevocationList *crl)
RZ_API void rz_x509_tbscertificate_json(PJ *pj, RX509TBSCertificate *tbsc)
RZ_API bool rz_x509_parse_algorithmidentifier(RX509AlgorithmIdentifier *ai, RASN1Object *object)
static xnu_exception_info ex