Lines Matching defs:entp

168     const struct entity *entp)
176 if ((roa = roa_parse(&x509, file, entp->talid, der, len)) == NULL)
179 a = find_issuer(file, entp->certid, roa->aki, entp->mftaki);
210 const struct entity *entp)
218 if ((spl = spl_parse(&x509, file, entp->talid, der, len)) == NULL)
221 a = find_issuer(file, entp->certid, spl->aki, entp->mftaki);
296 parse_load_crl_from_mft(struct entity *entp, struct mft *mft, enum location loc,
306 fn = parse_filepath(entp->repoid, entp->path, mft->crl, loc);
351 proc_parser_mft_pre(struct entity *entp, char *file, struct crl **crl,
373 if ((mft = mft_parse(&x509, file, entp->talid, der, len)) == NULL) {
378 if (entp->path != NULL) {
379 if ((mft->path = strdup(entp->path)) == NULL)
388 *crl = parse_load_crl_from_mft(entp, mft, DIR_TEMP, crlfile);
390 *crl = parse_load_crl_from_mft(entp, mft, DIR_VALID, crlfile);
392 a = find_issuer(file, entp->certid, mft->aki, NULL);
400 mft->repoid = entp->repoid;
402 mft->certid = entp->certid;
482 proc_parser_mft(struct entity *entp, struct mft **mp, char **crlfile,
494 file2 = parse_filepath(entp->repoid, entp->path, entp->file, DIR_VALID);
495 mft2 = proc_parser_mft_pre(entp, file2, &crl2, &crl2file, NULL, &err2);
498 file1 = parse_filepath(entp->repoid, entp->path, entp->file,
500 mft1 = proc_parser_mft_pre(entp, file1, &crl1, &crl1file, mft2,
561 const struct entity *entp)
575 a = find_issuer(file, entp->certid, cert->aki, entp->mftaki);
655 proc_parser_root_cert(struct entity *entp, struct cert **out_cert)
659 unsigned char *der = NULL, *pkey = entp->data;
660 size_t der_len = 0, pkeysz = entp->datasz;
665 file2 = parse_filepath(entp->repoid, entp->path, entp->file, DIR_VALID);
672 file1 = parse_filepath(entp->repoid, entp->path, entp->file,
684 cert1->talid = entp->talid;
691 warnx("%s: cached TA is newer", entp->file);
696 cert2->talid = entp->talid;
710 const struct entity *entp)
718 if ((gbr = gbr_parse(&x509, file, entp->talid, der, len)) == NULL)
721 a = find_issuer(file, entp->certid, gbr->aki, entp->mftaki);
749 const struct entity *entp)
757 if ((aspa = aspa_parse(&x509, file, entp->talid, der, len)) == NULL)
760 a = find_issuer(file, entp->certid, aspa->aki, entp->mftaki);
790 const struct entity *entp)
798 if ((tak = tak_parse(&x509, file, entp->talid, der, len)) == NULL)
801 a = find_issuer(file, entp->certid, tak->aki, entp->mftaki);
832 parse_load_file(struct entity *entp, unsigned char **f, size_t *flen)
836 file = parse_filepath(entp->repoid, entp->path, entp->file,
837 entp->location);
854 struct entity *entp;
870 while ((entp = TAILQ_FIRST(q)) != NULL) {
871 TAILQ_REMOVE(q, entp, entries);
874 if (entp->type == RTYPE_REPO) {
875 repo_add(entp->repoid, entp->path, entp->file);
876 entity_free(entp);
882 io_simple_buffer(b, &entp->type, sizeof(entp->type));
883 io_simple_buffer(b, &entp->repoid, sizeof(entp->repoid));
884 io_simple_buffer(b, &entp->talid, sizeof(entp->talid));
891 switch (entp->type) {
893 io_str_buffer(b, entp->file);
895 if ((tal = tal_parse(entp->file, entp->data,
896 entp->datasz)) == NULL)
898 entp->file);
899 tal->id = entp->talid;
904 if (entp->data != NULL) {
905 file = proc_parser_root_cert(entp, &cert);
907 file = parse_load_file(entp, &f, &flen);
908 cert = proc_parser_cert(file, f, flen, entp);
917 cert->repoid = entp->repoid;
927 file = proc_parser_mft(entp, &mft, &crlfile, &crlmtime);
945 io_simple_buffer(b2, &entp->repoid,
946 sizeof(entp->repoid));
947 io_simple_buffer(b2, &entp->talid,
948 sizeof(entp->talid));
959 file = parse_load_file(entp, &f, &flen);
961 roa = proc_parser_roa(file, f, flen, entp);
972 file = parse_load_file(entp, &f, &flen);
974 gbr = proc_parser_gbr(file, f, flen, entp);
981 file = parse_load_file(entp, &f, &flen);
983 aspa = proc_parser_aspa(file, f, flen, entp);
994 file = parse_load_file(entp, &f, &flen);
996 tak = proc_parser_tak(file, f, flen, entp);
1003 file = parse_load_file(entp, &f, &flen);
1006 spl = proc_parser_spl(file, f, flen, entp);
1023 file = parse_filepath(entp->repoid, entp->path,
1024 entp->file, entp->location);
1027 warnx("%s: unhandled type %d", file, entp->type);
1034 entity_free(entp);
1051 struct entity *entp;
1105 entp = calloc(1, sizeof(struct entity));
1106 if (entp == NULL)
1108 entity_read_req(b, entp);
1109 TAILQ_INSERT_TAIL(&q, entp, entries);
1126 while ((entp = TAILQ_FIRST(&q)) != NULL) {
1127 TAILQ_REMOVE(&q, entp, entries);
1128 entity_free(entp);