1 /* test returns a "sane" time if the host, port, and proxy 2 * are passed in properly on the commandline. The test 3 * is invoked by tlsdated instead of tlsdate. 4 * This expects host2, port2, proxy2. 5 * 6 * Paired with check-host-2.c, it allows for source rotation 7 * testing. 8 */ 9 #include "config.h" 10 #include <string.h> 11 #include <stdio.h> 12 13 int main (int argc, char *argv[]) 14 { 15 unsigned int t = RECENT_COMPILE_DATE + 1; 16 if (argc < 7) 17 return 3; 18 if (!strcmp (argv[2], "host2") 19 && !strcmp (argv[4], "port2") 20 && !strcmp (argv[6], "proxy2")) 21 { 22 fwrite (&t, sizeof (t), 1, stdout); 23 return 0; 24 } 25 return 1; 26 } 27