main.c
/*
 * Loops over queue_add_from_mft() for all files.
 * The order here is important: we want to parse the revocation
 * list *before* we parse anything else.
 * FIXME: set the type of file in the mftfile so that we don't need to
 * keep doing the check (this should be done in the parser, where we
 * check the suffix anyway).
 */
Loops over queue_add_from_mft() for all files.
The order here is important: we want to parse the revocation
list *before* we parse anything else.
FIXME: set the type of file in the mftfile so that we don't need to
keep doing the check (this should be done in the parser, where we
check the suffix anyway).
Loops over queue_add_from_mft () for all files . The order here is important : we want to parse the revocation list * before * we parse anything else . FIXME : set the type of file in the mftfile so that we don ' t need to keep doing the check ( this should be done in the parser where we check the suffix anyway ) .
static void
queue_add_from_mft_set(int fd, struct entityq *q, const struct mft *mft,
    size_t *eid)
{
	size_t			 i, sz;
	const struct mftfile	*f;
	for (i = 0; i < mft->filesz; i++) {
		f = &mft->files[i];
		sz = strlen(f->file);
		assert(sz > 4);
		if (strcasecmp(f->file + sz - 4, ".crl"))
			continue;
		queue_add_from_mft(fd, q, mft->file, f, RTYPE_CRL, eid);
	}
	for (i = 0; i < mft->filesz; i++) {
		f = &mft->files[i];
		sz = strlen(f->file);
		assert(sz > 4);
		if (strcasecmp(f->file + sz - 4, ".cer"))
			continue;
		queue_add_from_mft(fd, q, mft->file, f, RTYPE_CER, eid);
	}
	for (i = 0; i < mft->filesz; i++) {
		f = &mft->files[i];
		sz = strlen(f->file);
		assert(sz > 4);
		if (strcasecmp(f->file + sz - 4, ".roa"))
			continue;
		queue_add_from_mft(fd, q, mft->file, f, RTYPE_ROA, eid);
	}
}
static void queue_add_from_mft_set ( int fd , struct entityq * q , const struct mft * mft , size_t * eid ) { size_t i , sz ; const struct mftfile * f ; for ( i = 0 ; i < mft -> filesz ; i ++ ) { f = & mft -> files [ i ] ; sz = strlen ( f -> file ) ; assert ( sz > 4 ) ; if ( strcasecmp ( f -> file + sz - 4 , " " ) ) continue ; queue_add_from_mft ( fd , q , mft -> file , f , RTYPE_CRL , eid ) ; } for ( i = 0 ; i < mft -> filesz ; i ++ ) { f = & mft -> files [ i ] ; sz = strlen ( f -> file ) ; assert ( sz > 4 ) ; if ( strcasecmp ( f -> file + sz - 4 , " " ) ) continue ; queue_add_from_mft ( fd , q , mft -> file , f , RTYPE_CER , eid ) ; } for ( i = 0 ; i < mft -> filesz ; i ++ ) { f = & mft -> files [ i ] ; sz = strlen ( f -> file ) ; assert ( sz > 4 ) ; if ( strcasecmp ( f -> file + sz - 4 , " " ) ) continue ; queue_add_from_mft ( fd , q , mft -> file , f , RTYPE_ROA , eid ) ; } }
Loops over queue_add_from_mft() for all files.
Loops over queue_add_from_mft () for all files .