#### `strict`
+> In order to enable this strategy, recompile using the flag: **_ENABLE\_STRICT\_STRATEGY_**.
+>
+> e.g. `$ make FORT_FLAGS='-DENABLE_STRICT_STRATEGY'`
+
rsyncs every repository publication point separately. Only skips publication points that have already been downloaded during the current validation cycle. (Assuming each synchronization is recursive.)
For example, suppose the validator gets certificates whose caRepository access methods (in their Subject Information Access extensions) point to the following publication points:
.P
.I strict
.RS 4
+In order to enable this strategy, FORT must be compiled using the flag:
+ENABLE\_STRICT\_STRATEGY. e.g.
+\fB $ make FORT_FLAGS='-DENABLE_STRICT_STRATEGY'\fR
+.P
RSYNC every repository publication point separately. Only skip publication
points that have already been downloaded during the current validation cycle.
(Assuming each synchronization is recursive.)
fort_CFLAGS = -Wall
# Feel free to temporarily remove this one if you're not using gcc 7.3.0.
#fort_CFLAGS += $(GCC_WARNS)
-fort_CFLAGS += -std=gnu11 -O0 -g $(CFLAGS_DEBUG)
+fort_CFLAGS += -std=gnu11 -O0 -g $(CFLAGS_DEBUG) $(FORT_FLAGS)
fort_LDFLAGS = $(LDFLAGS_DEBUG)
fort_LDADD = ${JANSSON_LIBS}
#define DEREFERENCE(void_value) (*((enum sync_strategy *) void_value))
+#ifdef ENABLE_STRICT_STRATEGY
+#define PRINT_STRICT_ARG_DOC "|" SYNC_VALUE_STRICT
+#define HANDLE_SYNC_STRICT DEREFERENCE(result) = SYNC_STRICT;
+#else
+#define PRINT_STRICT_ARG_DOC
+#define HANDLE_SYNC_STRICT \
+ return pr_err("Unknown synchronization strategy: '%s'. In order to use it, recompile using flag ENABLE_STRICT_STRATEGY.",\
+ str);
+#endif
+
static void
print_sync_strategy(struct option_field const *field, void *value)
{
if (strcmp(str, SYNC_VALUE_OFF) == 0)
DEREFERENCE(result) = SYNC_OFF;
else if (strcmp(str, SYNC_VALUE_STRICT) == 0)
- DEREFERENCE(result) = SYNC_STRICT;
+ HANDLE_SYNC_STRICT
else if (strcmp(str, SYNC_VALUE_ROOT) == 0)
DEREFERENCE(result) = SYNC_ROOT;
else if (strcmp(str, SYNC_VALUE_ROOT_EXCEPT_TA) == 0)
.parse.argv = parse_argv_sync_strategy,
.parse.json = parse_json_sync_strategy,
.arg_doc = SYNC_VALUE_OFF
- "|" SYNC_VALUE_STRICT
+ PRINT_STRICT_ARG_DOC
"|" SYNC_VALUE_ROOT
"|" SYNC_VALUE_ROOT_EXCEPT_TA,
};
*
* No risk of downloading unneeded files, but otherwise slow, as every
* different repository publication point requires a separate sync call.
+ *
+ * In order to enable this strategy, compile using the flag:
+ * ENABLE_STRICT_STRATEGY
*/
SYNC_STRICT,
/**