예제 #1
0
파일: signit.c 프로젝트: Bluecoreg/monero
/** read expi ince keytag owner from cmdline */
static void
parse_cmdline(char *argv[], struct keysets* s)
{
	s->expi = convert_timeval(argv[1]);
	s->incep = convert_timeval(argv[2]);
	s->keytag = (uint16_t)atoi(argv[3]);
	s->owner = argv[4];
	s->flags = DNSKEY_BIT_ZSK; /* to enforce signing */
}
예제 #2
0
int msntp_get_offset(char *hostname, int port, struct timeval *offset) {
    int ret;
    double offset_d;

    setup(hostname, port);
    operation = op_client;

    if (ret = run_client(&hostname, 1, &offset_d))
        return ret;
    *offset = convert_timeval(offset_d);
    return 0;
}
예제 #3
0
int msntp_get_time(char *hostname, int port, struct timeval *server_time) {
    int ret;
    double offset;

    setup(hostname, port);
    operation = op_client;

    if (ret = run_client(&hostname, 1, &offset))
        return ret;
    *server_time = convert_timeval(current_time(offset));
    return 0;
}