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 host1, port1, proxy1.
5 *
6 * Paired with check-host-2.c, it allows for source rotation
7 * testing.
8 */
9#include "config.h"
10
11#include <string.h>
12#include <stdio.h>
13
14int main (int argc, char *argv[])
15{
16  unsigned int t = RECENT_COMPILE_DATE + 1;
17  if (argc < 7)
18    return 3;
19  if (!strcmp (argv[2], "host1")
20      && !strcmp (argv[4], "port1")
21      && !strcmp (argv[6], "proxy1"))
22    {
23      fwrite (&t, sizeof (t), 1, stdout);
24      return 0;
25    }
26  return 1;
27}
28