diff options
Diffstat (limited to 'util')
| -rw-r--r-- | util/Makefile.am | 1 | ||||
| -rw-r--r-- | util/Makefile.in | 9 | ||||
| -rw-r--r-- | util/invoke-ntp-keygen.texi | 4 | ||||
| -rw-r--r-- | util/jitter.h | 6 | ||||
| -rw-r--r-- | util/ntp-keygen-opts.c | 368 | ||||
| -rw-r--r-- | util/ntp-keygen-opts.h | 10 | ||||
| -rw-r--r-- | util/ntp-keygen.1ntp-keygenman | 10 | ||||
| -rw-r--r-- | util/ntp-keygen.1ntp-keygenmdoc | 8 | ||||
| -rw-r--r-- | util/ntp-keygen.c | 51 | ||||
| -rw-r--r-- | util/ntp-keygen.html | 4 | ||||
| -rw-r--r-- | util/ntp-keygen.man.in | 10 | ||||
| -rw-r--r-- | util/ntp-keygen.mdoc.in | 8 | ||||
| -rw-r--r-- | util/ntptime.c | 9 |
13 files changed, 254 insertions, 244 deletions
diff --git a/util/Makefile.am b/util/Makefile.am index 4265e0b4b957f..88bf7cb022be1 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP) LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a +ntp_keygen_LDADD += $(LDADD_LIBEVENT) ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM) ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h diff --git a/util/Makefile.in b/util/Makefile.in index f179f73cdad1d..0325e445d648c 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -131,7 +131,8 @@ am_ntp_keygen_OBJECTS = ntp-keygen.$(OBJEXT) ntp-keygen-opts.$(OBJEXT) ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS) ntp_keygen_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \ ../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) ntptime_SOURCES = ntptime.c ntptime_OBJECTS = ntptime.$(OBJEXT) ntptime_LDADD = $(LDADD) @@ -259,6 +260,7 @@ CHUTEST = @CHUTEST@ CONFIG_SHELL = @CONFIG_SHELL@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@ CPPFLAGS_NTP = @CPPFLAGS_NTP@ CXX = @CXX@ CXXCPP = @CXXCPP@ @@ -293,7 +295,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ +LDADD_LIBEVENT = @LDADD_LIBEVENT@ LDADD_LIBNTP = @LDADD_LIBNTP@ +LDADD_LIBUTIL = @LDADD_LIBUTIL@ LDADD_NLIST = @LDADD_NLIST@ LDADD_NTP = @LDADD_NTP@ LDFLAGS = @LDFLAGS@ @@ -502,7 +506,8 @@ AM_LDFLAGS = $(LDFLAGS_NTP) LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) tg2_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \ - $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM) + $(LDADD_LIBEVENT) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) \ + $(LIBM) ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h tickadj_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST) EXTRA_DIST = \ diff --git a/util/invoke-ntp-keygen.texi b/util/invoke-ntp-keygen.texi index 56ab5a8d25046..808757dc94c23 100644 --- a/util/invoke-ntp-keygen.texi +++ b/util/invoke-ntp-keygen.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi) # -# It has been AutoGen-ed December 19, 2014 at 07:50:55 AM by AutoGen 5.18.5pre4 +# It has been AutoGen-ed February 4, 2015 at 02:43:59 AM by AutoGen 5.18.5pre4 # From the definitions ntp-keygen-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -886,7 +886,7 @@ with a status code of 0. @exampleindent 0 @example -ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8 +ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1 Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... Flg Arg Option-Name Description -b Num imbits identity modulus bits diff --git a/util/jitter.h b/util/jitter.h index 8c774b0909881..14314063b59ae 100644 --- a/util/jitter.h +++ b/util/jitter.h @@ -137,9 +137,9 @@ typedef u_int32 u_fp; /* * Conversions between the two fixed point types */ -#define MFPTOFP(x_i, x_f) (((x_i) >= 0x00010000) ? 0x7fffffff : \ - (((x_i) <= -0x00010000) ? 0x80000000 : \ - (((x_i)<<16) | (((x_f)>>16)&0xffff)))) +#define MFPTOFP(x_i, x_f) (((int)(x_i) >= 0x00010000) ? 0x7fffffff : \ + (((int)(x_i) <= -0x00010000) ? 0x80000000 : \ + (u_int)(((x_i)<<16) | (((x_f)>>16)&0xffff)))) #define LFPTOFP(v) MFPTOFP((v)->l_i, (v)->l_f) #define UFPTOLFP(x, v) ((v)->l_ui = (u_fp)(x)>>16, (v)->l_uf = (x)<<16) diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c index 9e7de885433f1..aff2d01de3ab1 100644 --- a/util/ntp-keygen-opts.c +++ b/util/ntp-keygen-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c) * - * It has been AutoGen-ed December 19, 2014 at 07:50:39 AM by AutoGen 5.18.5pre4 + * It has been AutoGen-ed February 4, 2015 at 02:43:42 AM by AutoGen 5.18.5pre4 * From the definitions ntp-keygen-opts.def * and the template file options * @@ -18,7 +18,7 @@ * The ntp-keygen program is copyrighted and licensed * under the following terms: * - * Copyright (C) 1970-2014 The University of Delaware, all rights reserved. + * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the NTP License, copies of which * can be seen at: @@ -31,7 +31,7 @@ * both the copyright notice and this permission notice appear in * supporting documentation, and that the name The University of Delaware not be used in * advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. The University of Delaware makes no + * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no * representations about the suitability this software for any purpose. It * is provided "as is" without express or implied warranty. */ @@ -51,7 +51,7 @@ extern "C" { #endif extern FILE * option_usage_fp; #define zCopyright (ntp_keygen_opt_strs+0) -#define zLicenseDescrip (ntp_keygen_opt_strs+322) +#define zLicenseDescrip (ntp_keygen_opt_strs+352) /* * global included definitions @@ -71,117 +71,118 @@ extern FILE * option_usage_fp; /** * static const strings for ntp-keygen options */ -static char const ntp_keygen_opt_strs[2357] = -/* 0 */ "ntp-keygen (ntp) 4.2.8\n" - "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n" +static char const ntp_keygen_opt_strs[2419] = +/* 0 */ "ntp-keygen (ntp) 4.2.8p1\n" + "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the NTP License, copies of which\n" "can be seen at:\n" " <http://ntp.org/license>\n" " <http://opensource.org/licenses/ntp-license.php>\n\0" -/* 322 */ "Permission to use, copy, modify, and distribute this software and its\n" +/* 352 */ "Permission to use, copy, modify, and distribute this software and its\n" "documentation for any purpose with or without fee is hereby granted,\n" "provided that the above copyright notice appears in all copies and that\n" "both the copyright notice and this permission notice appear in supporting\n" "documentation, and that the name The University of Delaware not be used in\n" "advertising or publicity pertaining to distribution of the software without\n" - "specific, written prior permission. The University of Delaware makes no\n" - "representations about the suitability this software for any purpose. It is\n" - "provided \"as is\" without express or implied warranty.\n\0" -/* 962 */ "identity modulus bits\0" -/* 984 */ "IMBITS\0" -/* 991 */ "imbits\0" -/* 998 */ "certificate scheme\0" -/* 1017 */ "CERTIFICATE\0" -/* 1029 */ "certificate\0" -/* 1041 */ "privatekey cipher\0" -/* 1059 */ "CIPHER\0" -/* 1066 */ "cipher\0" -/* 1073 */ "Increase debug verbosity level\0" -/* 1104 */ "DEBUG_LEVEL\0" -/* 1116 */ "debug-level\0" -/* 1128 */ "Set the debug verbosity level\0" -/* 1158 */ "SET_DEBUG_LEVEL\0" -/* 1174 */ "set-debug-level\0" -/* 1190 */ "Write IFF or GQ identity keys\0" -/* 1220 */ "ID_KEY\0" -/* 1227 */ "id-key\0" -/* 1234 */ "Generate GQ parameters and keys\0" -/* 1266 */ "GQ_PARAMS\0" -/* 1276 */ "gq-params\0" -/* 1286 */ "generate RSA host key\0" -/* 1308 */ "HOST_KEY\0" -/* 1317 */ "host-key\0" -/* 1326 */ "generate IFF parameters\0" -/* 1350 */ "IFFKEY\0" -/* 1357 */ "iffkey\0" -/* 1364 */ "set Autokey group name\0" -/* 1387 */ "IDENT\0" -/* 1393 */ "ident\0" -/* 1399 */ "set certificate lifetime\0" -/* 1424 */ "LIFETIME\0" -/* 1433 */ "lifetime\0" -/* 1442 */ "generate MD5 keys\0" -/* 1460 */ "MD5KEY\0" -/* 1467 */ "md5key\0" -/* 1474 */ "modulus\0" -/* 1482 */ "MODULUS\0" -/* 1490 */ "generate PC private certificate\0" -/* 1522 */ "PVT_CERT\0" -/* 1531 */ "pvt-cert\0" -/* 1540 */ "local private password\0" -/* 1563 */ "PASSWORD\0" -/* 1572 */ "password\0" -/* 1581 */ "export IFF or GQ group keys with password\0" -/* 1623 */ "EXPORT_PASSWD\0" -/* 1637 */ "export-passwd\0" -/* 1651 */ "generate sign key (RSA or DSA)\0" -/* 1682 */ "SIGN_KEY\0" -/* 1691 */ "sign-key\0" -/* 1700 */ "set host and optionally group name\0" -/* 1735 */ "SUBJECT_NAME\0" -/* 1748 */ "subject-name\0" -/* 1761 */ "trusted certificate (TC scheme)\0" -/* 1793 */ "TRUSTED_CERT\0" -/* 1806 */ "trusted-cert\0" -/* 1819 */ "generate <num> MV parameters\0" -/* 1848 */ "MV_PARAMS\0" -/* 1858 */ "mv-params\0" -/* 1868 */ "update <num> MV keys\0" -/* 1889 */ "MV_KEYS\0" -/* 1897 */ "mv-keys\0" -/* 1905 */ "display extended usage information and exit\0" -/* 1949 */ "help\0" -/* 1954 */ "extended usage information passed thru pager\0" -/* 1999 */ "more-help\0" -/* 2009 */ "output version information and exit\0" -/* 2045 */ "version\0" -/* 2053 */ "save the option state to a config file\0" -/* 2092 */ "save-opts\0" -/* 2102 */ "load options from a config file\0" -/* 2134 */ "LOAD_OPTS\0" -/* 2144 */ "no-load-opts\0" -/* 2157 */ "no\0" -/* 2160 */ "NTP_KEYGEN\0" -/* 2171 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8\n" + "specific, written prior permission. The University of Delaware and Network\n" + "Time Foundation makes no representations about the suitability this\n" + "software for any purpose. It is provided \"as is\" without express or\n" + "implied warranty.\n\0" +/* 1020 */ "identity modulus bits\0" +/* 1042 */ "IMBITS\0" +/* 1049 */ "imbits\0" +/* 1056 */ "certificate scheme\0" +/* 1075 */ "CERTIFICATE\0" +/* 1087 */ "certificate\0" +/* 1099 */ "privatekey cipher\0" +/* 1117 */ "CIPHER\0" +/* 1124 */ "cipher\0" +/* 1131 */ "Increase debug verbosity level\0" +/* 1162 */ "DEBUG_LEVEL\0" +/* 1174 */ "debug-level\0" +/* 1186 */ "Set the debug verbosity level\0" +/* 1216 */ "SET_DEBUG_LEVEL\0" +/* 1232 */ "set-debug-level\0" +/* 1248 */ "Write IFF or GQ identity keys\0" +/* 1278 */ "ID_KEY\0" +/* 1285 */ "id-key\0" +/* 1292 */ "Generate GQ parameters and keys\0" +/* 1324 */ "GQ_PARAMS\0" +/* 1334 */ "gq-params\0" +/* 1344 */ "generate RSA host key\0" +/* 1366 */ "HOST_KEY\0" +/* 1375 */ "host-key\0" +/* 1384 */ "generate IFF parameters\0" +/* 1408 */ "IFFKEY\0" +/* 1415 */ "iffkey\0" +/* 1422 */ "set Autokey group name\0" +/* 1445 */ "IDENT\0" +/* 1451 */ "ident\0" +/* 1457 */ "set certificate lifetime\0" +/* 1482 */ "LIFETIME\0" +/* 1491 */ "lifetime\0" +/* 1500 */ "generate MD5 keys\0" +/* 1518 */ "MD5KEY\0" +/* 1525 */ "md5key\0" +/* 1532 */ "modulus\0" +/* 1540 */ "MODULUS\0" +/* 1548 */ "generate PC private certificate\0" +/* 1580 */ "PVT_CERT\0" +/* 1589 */ "pvt-cert\0" +/* 1598 */ "local private password\0" +/* 1621 */ "PASSWORD\0" +/* 1630 */ "password\0" +/* 1639 */ "export IFF or GQ group keys with password\0" +/* 1681 */ "EXPORT_PASSWD\0" +/* 1695 */ "export-passwd\0" +/* 1709 */ "generate sign key (RSA or DSA)\0" +/* 1740 */ "SIGN_KEY\0" +/* 1749 */ "sign-key\0" +/* 1758 */ "set host and optionally group name\0" +/* 1793 */ "SUBJECT_NAME\0" +/* 1806 */ "subject-name\0" +/* 1819 */ "trusted certificate (TC scheme)\0" +/* 1851 */ "TRUSTED_CERT\0" +/* 1864 */ "trusted-cert\0" +/* 1877 */ "generate <num> MV parameters\0" +/* 1906 */ "MV_PARAMS\0" +/* 1916 */ "mv-params\0" +/* 1926 */ "update <num> MV keys\0" +/* 1947 */ "MV_KEYS\0" +/* 1955 */ "mv-keys\0" +/* 1963 */ "display extended usage information and exit\0" +/* 2007 */ "help\0" +/* 2012 */ "extended usage information passed thru pager\0" +/* 2057 */ "more-help\0" +/* 2067 */ "output version information and exit\0" +/* 2103 */ "version\0" +/* 2111 */ "save the option state to a config file\0" +/* 2150 */ "save-opts\0" +/* 2160 */ "load options from a config file\0" +/* 2192 */ "LOAD_OPTS\0" +/* 2202 */ "no-load-opts\0" +/* 2215 */ "no\0" +/* 2218 */ "NTP_KEYGEN\0" +/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" -/* 2283 */ "$HOME\0" -/* 2289 */ ".\0" -/* 2291 */ ".ntprc\0" -/* 2298 */ "http://bugs.ntp.org, bugs@ntp.org\0" -/* 2332 */ "\n\0" -/* 2334 */ "ntp-keygen (ntp) 4.2.8"; +/* 2343 */ "$HOME\0" +/* 2349 */ ".\0" +/* 2351 */ ".ntprc\0" +/* 2358 */ "http://bugs.ntp.org, bugs@ntp.org\0" +/* 2392 */ "\n\0" +/* 2394 */ "ntp-keygen (ntp) 4.2.8p1"; /** * imbits option description: */ #ifdef AUTOKEY /** Descriptive text for the imbits option */ -#define IMBITS_DESC (ntp_keygen_opt_strs+962) +#define IMBITS_DESC (ntp_keygen_opt_strs+1020) /** Upper-cased name for the imbits option */ -#define IMBITS_NAME (ntp_keygen_opt_strs+984) +#define IMBITS_NAME (ntp_keygen_opt_strs+1042) /** Name string for the imbits option */ -#define IMBITS_name (ntp_keygen_opt_strs+991) +#define IMBITS_name (ntp_keygen_opt_strs+1049) /** Compiled in flag settings for the imbits option */ #define IMBITS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -198,11 +199,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the certificate option */ -#define CERTIFICATE_DESC (ntp_keygen_opt_strs+998) +#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1056) /** Upper-cased name for the certificate option */ -#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1017) +#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1075) /** Name string for the certificate option */ -#define CERTIFICATE_name (ntp_keygen_opt_strs+1029) +#define CERTIFICATE_name (ntp_keygen_opt_strs+1087) /** Compiled in flag settings for the certificate option */ #define CERTIFICATE_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -219,11 +220,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the cipher option */ -#define CIPHER_DESC (ntp_keygen_opt_strs+1041) +#define CIPHER_DESC (ntp_keygen_opt_strs+1099) /** Upper-cased name for the cipher option */ -#define CIPHER_NAME (ntp_keygen_opt_strs+1059) +#define CIPHER_NAME (ntp_keygen_opt_strs+1117) /** Name string for the cipher option */ -#define CIPHER_name (ntp_keygen_opt_strs+1066) +#define CIPHER_name (ntp_keygen_opt_strs+1124) /** Compiled in flag settings for the cipher option */ #define CIPHER_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -239,11 +240,11 @@ static char const ntp_keygen_opt_strs[2357] = * debug-level option description: */ /** Descriptive text for the debug-level option */ -#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1073) +#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1131) /** Upper-cased name for the debug-level option */ -#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1104) +#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1162) /** Name string for the debug-level option */ -#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1116) +#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1174) /** Compiled in flag settings for the debug-level option */ #define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) @@ -251,11 +252,11 @@ static char const ntp_keygen_opt_strs[2357] = * set-debug-level option description: */ /** Descriptive text for the set-debug-level option */ -#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1128) +#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1186) /** Upper-cased name for the set-debug-level option */ -#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1158) +#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1216) /** Name string for the set-debug-level option */ -#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1174) +#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1232) /** Compiled in flag settings for the set-debug-level option */ #define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -265,11 +266,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the id-key option */ -#define ID_KEY_DESC (ntp_keygen_opt_strs+1190) +#define ID_KEY_DESC (ntp_keygen_opt_strs+1248) /** Upper-cased name for the id-key option */ -#define ID_KEY_NAME (ntp_keygen_opt_strs+1220) +#define ID_KEY_NAME (ntp_keygen_opt_strs+1278) /** Name string for the id-key option */ -#define ID_KEY_name (ntp_keygen_opt_strs+1227) +#define ID_KEY_name (ntp_keygen_opt_strs+1285) /** Compiled in flag settings for the id-key option */ #define ID_KEY_FLAGS (OPTST_DISABLED) @@ -285,11 +286,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the gq-params option */ -#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1234) +#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1292) /** Upper-cased name for the gq-params option */ -#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1266) +#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1324) /** Name string for the gq-params option */ -#define GQ_PARAMS_name (ntp_keygen_opt_strs+1276) +#define GQ_PARAMS_name (ntp_keygen_opt_strs+1334) /** Compiled in flag settings for the gq-params option */ #define GQ_PARAMS_FLAGS (OPTST_DISABLED) @@ -305,11 +306,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the host-key option */ -#define HOST_KEY_DESC (ntp_keygen_opt_strs+1286) +#define HOST_KEY_DESC (ntp_keygen_opt_strs+1344) /** Upper-cased name for the host-key option */ -#define HOST_KEY_NAME (ntp_keygen_opt_strs+1308) +#define HOST_KEY_NAME (ntp_keygen_opt_strs+1366) /** Name string for the host-key option */ -#define HOST_KEY_name (ntp_keygen_opt_strs+1317) +#define HOST_KEY_name (ntp_keygen_opt_strs+1375) /** Compiled in flag settings for the host-key option */ #define HOST_KEY_FLAGS (OPTST_DISABLED) @@ -325,11 +326,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the iffkey option */ -#define IFFKEY_DESC (ntp_keygen_opt_strs+1326) +#define IFFKEY_DESC (ntp_keygen_opt_strs+1384) /** Upper-cased name for the iffkey option */ -#define IFFKEY_NAME (ntp_keygen_opt_strs+1350) +#define IFFKEY_NAME (ntp_keygen_opt_strs+1408) /** Name string for the iffkey option */ -#define IFFKEY_name (ntp_keygen_opt_strs+1357) +#define IFFKEY_name (ntp_keygen_opt_strs+1415) /** Compiled in flag settings for the iffkey option */ #define IFFKEY_FLAGS (OPTST_DISABLED) @@ -345,11 +346,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the ident option */ -#define IDENT_DESC (ntp_keygen_opt_strs+1364) +#define IDENT_DESC (ntp_keygen_opt_strs+1422) /** Upper-cased name for the ident option */ -#define IDENT_NAME (ntp_keygen_opt_strs+1387) +#define IDENT_NAME (ntp_keygen_opt_strs+1445) /** Name string for the ident option */ -#define IDENT_name (ntp_keygen_opt_strs+1393) +#define IDENT_name (ntp_keygen_opt_strs+1451) /** Compiled in flag settings for the ident option */ #define IDENT_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -366,11 +367,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the lifetime option */ -#define LIFETIME_DESC (ntp_keygen_opt_strs+1399) +#define LIFETIME_DESC (ntp_keygen_opt_strs+1457) /** Upper-cased name for the lifetime option */ -#define LIFETIME_NAME (ntp_keygen_opt_strs+1424) +#define LIFETIME_NAME (ntp_keygen_opt_strs+1482) /** Name string for the lifetime option */ -#define LIFETIME_name (ntp_keygen_opt_strs+1433) +#define LIFETIME_name (ntp_keygen_opt_strs+1491) /** Compiled in flag settings for the lifetime option */ #define LIFETIME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -386,11 +387,11 @@ static char const ntp_keygen_opt_strs[2357] = * md5key option description: */ /** Descriptive text for the md5key option */ -#define MD5KEY_DESC (ntp_keygen_opt_strs+1442) +#define MD5KEY_DESC (ntp_keygen_opt_strs+1500) /** Upper-cased name for the md5key option */ -#define MD5KEY_NAME (ntp_keygen_opt_strs+1460) +#define MD5KEY_NAME (ntp_keygen_opt_strs+1518) /** Name string for the md5key option */ -#define MD5KEY_name (ntp_keygen_opt_strs+1467) +#define MD5KEY_name (ntp_keygen_opt_strs+1525) /** Compiled in flag settings for the md5key option */ #define MD5KEY_FLAGS (OPTST_DISABLED) @@ -399,11 +400,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the modulus option */ -#define MODULUS_DESC (ntp_keygen_opt_strs+1474) +#define MODULUS_DESC (ntp_keygen_opt_strs+1532) /** Upper-cased name for the modulus option */ -#define MODULUS_NAME (ntp_keygen_opt_strs+1482) +#define MODULUS_NAME (ntp_keygen_opt_strs+1540) /** Name string for the modulus option */ -#define MODULUS_name (ntp_keygen_opt_strs+1474) +#define MODULUS_name (ntp_keygen_opt_strs+1532) /** Compiled in flag settings for the modulus option */ #define MODULUS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -420,11 +421,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the pvt-cert option */ -#define PVT_CERT_DESC (ntp_keygen_opt_strs+1490) +#define PVT_CERT_DESC (ntp_keygen_opt_strs+1548) /** Upper-cased name for the pvt-cert option */ -#define PVT_CERT_NAME (ntp_keygen_opt_strs+1522) +#define PVT_CERT_NAME (ntp_keygen_opt_strs+1580) /** Name string for the pvt-cert option */ -#define PVT_CERT_name (ntp_keygen_opt_strs+1531) +#define PVT_CERT_name (ntp_keygen_opt_strs+1589) /** Compiled in flag settings for the pvt-cert option */ #define PVT_CERT_FLAGS (OPTST_DISABLED) @@ -440,11 +441,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the password option */ -#define PASSWORD_DESC (ntp_keygen_opt_strs+1540) +#define PASSWORD_DESC (ntp_keygen_opt_strs+1598) /** Upper-cased name for the password option */ -#define PASSWORD_NAME (ntp_keygen_opt_strs+1563) +#define PASSWORD_NAME (ntp_keygen_opt_strs+1621) /** Name string for the password option */ -#define PASSWORD_name (ntp_keygen_opt_strs+1572) +#define PASSWORD_name (ntp_keygen_opt_strs+1630) /** Compiled in flag settings for the password option */ #define PASSWORD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -461,11 +462,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the export-passwd option */ -#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1581) +#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1639) /** Upper-cased name for the export-passwd option */ -#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1623) +#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1681) /** Name string for the export-passwd option */ -#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1637) +#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1695) /** Compiled in flag settings for the export-passwd option */ #define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -482,11 +483,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the sign-key option */ -#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1651) +#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1709) /** Upper-cased name for the sign-key option */ -#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1682) +#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1740) /** Name string for the sign-key option */ -#define SIGN_KEY_name (ntp_keygen_opt_strs+1691) +#define SIGN_KEY_name (ntp_keygen_opt_strs+1749) /** Compiled in flag settings for the sign-key option */ #define SIGN_KEY_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -503,11 +504,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the subject-name option */ -#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1700) +#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1758) /** Upper-cased name for the subject-name option */ -#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1735) +#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1793) /** Name string for the subject-name option */ -#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1748) +#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1806) /** Compiled in flag settings for the subject-name option */ #define SUBJECT_NAME_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) @@ -524,11 +525,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the trusted-cert option */ -#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1761) +#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1819) /** Upper-cased name for the trusted-cert option */ -#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1793) +#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1851) /** Name string for the trusted-cert option */ -#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1806) +#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1864) /** Compiled in flag settings for the trusted-cert option */ #define TRUSTED_CERT_FLAGS (OPTST_DISABLED) @@ -544,11 +545,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the mv-params option */ -#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1819) +#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1877) /** Upper-cased name for the mv-params option */ -#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1848) +#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1906) /** Name string for the mv-params option */ -#define MV_PARAMS_name (ntp_keygen_opt_strs+1858) +#define MV_PARAMS_name (ntp_keygen_opt_strs+1916) /** Compiled in flag settings for the mv-params option */ #define MV_PARAMS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -565,11 +566,11 @@ static char const ntp_keygen_opt_strs[2357] = */ #ifdef AUTOKEY /** Descriptive text for the mv-keys option */ -#define MV_KEYS_DESC (ntp_keygen_opt_strs+1868) +#define MV_KEYS_DESC (ntp_keygen_opt_strs+1926) /** Upper-cased name for the mv-keys option */ -#define MV_KEYS_NAME (ntp_keygen_opt_strs+1889) +#define MV_KEYS_NAME (ntp_keygen_opt_strs+1947) /** Name string for the mv-keys option */ -#define MV_KEYS_name (ntp_keygen_opt_strs+1897) +#define MV_KEYS_name (ntp_keygen_opt_strs+1955) /** Compiled in flag settings for the mv-keys option */ #define MV_KEYS_FLAGS (OPTST_DISABLED \ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) @@ -584,11 +585,11 @@ static char const ntp_keygen_opt_strs[2357] = /* * Help/More_Help/Version option descriptions: */ -#define HELP_DESC (ntp_keygen_opt_strs+1905) -#define HELP_name (ntp_keygen_opt_strs+1949) +#define HELP_DESC (ntp_keygen_opt_strs+1963) +#define HELP_name (ntp_keygen_opt_strs+2007) #ifdef HAVE_WORKING_FORK -#define MORE_HELP_DESC (ntp_keygen_opt_strs+1954) -#define MORE_HELP_name (ntp_keygen_opt_strs+1999) +#define MORE_HELP_DESC (ntp_keygen_opt_strs+2012) +#define MORE_HELP_name (ntp_keygen_opt_strs+2057) #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) #else #define MORE_HELP_DESC HELP_DESC @@ -601,14 +602,14 @@ static char const ntp_keygen_opt_strs[2357] = # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) #endif -#define VER_DESC (ntp_keygen_opt_strs+2009) -#define VER_name (ntp_keygen_opt_strs+2045) -#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2053) -#define SAVE_OPTS_name (ntp_keygen_opt_strs+2092) -#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2102) -#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2134) -#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2144) -#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2157) +#define VER_DESC (ntp_keygen_opt_strs+2067) +#define VER_name (ntp_keygen_opt_strs+2103) +#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2111) +#define SAVE_OPTS_name (ntp_keygen_opt_strs+2150) +#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2160) +#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2192) +#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2202) +#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2215) #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) /** * Declare option callback procedures @@ -959,24 +960,24 @@ static tOptDesc optDesc[OPTION_CT] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** Reference to the upper cased version of ntp-keygen. */ -#define zPROGNAME (ntp_keygen_opt_strs+2160) +#define zPROGNAME (ntp_keygen_opt_strs+2218) /** Reference to the title line for ntp-keygen usage. */ -#define zUsageTitle (ntp_keygen_opt_strs+2171) +#define zUsageTitle (ntp_keygen_opt_strs+2229) /** ntp-keygen configuration file name. */ -#define zRcName (ntp_keygen_opt_strs+2291) +#define zRcName (ntp_keygen_opt_strs+2351) /** Directories to search for ntp-keygen config files. */ static char const * const apzHomeList[3] = { - ntp_keygen_opt_strs+2283, - ntp_keygen_opt_strs+2289, + ntp_keygen_opt_strs+2343, + ntp_keygen_opt_strs+2349, NULL }; /** The ntp-keygen program bug email address. */ -#define zBugsAddr (ntp_keygen_opt_strs+2298) +#define zBugsAddr (ntp_keygen_opt_strs+2358) /** Clarification/explanation of what ntp-keygen does. */ -#define zExplain (ntp_keygen_opt_strs+2332) +#define zExplain (ntp_keygen_opt_strs+2392) /** Extra detail explaining what ntp-keygen does. */ #define zDetail (NULL) /** The full version string for ntp-keygen. */ -#define zFullVersion (ntp_keygen_opt_strs+2334) +#define zFullVersion (ntp_keygen_opt_strs+2394) /* extracted from optcode.tlib near line 364 */ #if defined(ENABLE_NLS) @@ -1308,8 +1309,8 @@ static void bogus_function(void) { translate option names. */ /* referenced via ntp_keygenOptions.pzCopyright */ - puts(_("ntp-keygen (ntp) 4.2.8\n\ -Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\ + puts(_("ntp-keygen (ntp) 4.2.8p1\n\ +Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the NTP License, copies of which\n\ can be seen at:\n")); @@ -1323,9 +1324,10 @@ provided that the above copyright notice appears in all copies and that\n\ both the copyright notice and this permission notice appear in supporting\n\ documentation, and that the name The University of Delaware not be used in\n\ advertising or publicity pertaining to distribution of the software without\n\ -specific, written prior permission. The University of Delaware makes no\n\ -representations about the suitability this software for any purpose. It is\n\ -provided \"as is\" without express or implied warranty.\n")); +specific, written prior permission. The University of Delaware and Network\n\ +Time Foundation makes no representations about the suitability this\n\ +software for any purpose. It is provided \"as is\" without express or\n\ +implied warranty.\n")); /* referenced via ntp_keygenOptions.pOptDesc->pzText */ puts(_("identity modulus bits")); @@ -1406,14 +1408,14 @@ provided \"as is\" without express or implied warranty.\n")); puts(_("load options from a config file")); /* referenced via ntp_keygenOptions.pzUsageTitle */ - puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8\n\ + puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n\ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); /* referenced via ntp_keygenOptions.pzExplain */ puts(_("\n")); /* referenced via ntp_keygenOptions.pzFullVersion */ - puts(_("ntp-keygen (ntp) 4.2.8")); + puts(_("ntp-keygen (ntp) 4.2.8p1")); /* referenced via ntp_keygenOptions.pzFullUsage */ puts(_("<<<NOT-FOUND>>>")); diff --git a/util/ntp-keygen-opts.h b/util/ntp-keygen-opts.h index c16925055f4c8..48489999dda5a 100644 --- a/util/ntp-keygen-opts.h +++ b/util/ntp-keygen-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h) * - * It has been AutoGen-ed December 19, 2014 at 07:50:38 AM by AutoGen 5.18.5pre4 + * It has been AutoGen-ed February 4, 2015 at 02:43:41 AM by AutoGen 5.18.5pre4 * From the definitions ntp-keygen-opts.def * and the template file options * @@ -18,7 +18,7 @@ * The ntp-keygen program is copyrighted and licensed * under the following terms: * - * Copyright (C) 1970-2014 The University of Delaware, all rights reserved. + * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the NTP License, copies of which * can be seen at: @@ -31,7 +31,7 @@ * both the copyright notice and this permission notice appear in * supporting documentation, and that the name The University of Delaware not be used in * advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. The University of Delaware makes no + * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no * representations about the suitability this software for any purpose. It * is provided "as is" without express or implied warranty. */ @@ -94,9 +94,9 @@ typedef enum { /** count of all options for ntp-keygen */ #define OPTION_CT 26 /** ntp-keygen version */ -#define NTP_KEYGEN_VERSION "4.2.8" +#define NTP_KEYGEN_VERSION "4.2.8p1" /** Full ntp-keygen version text */ -#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8" +#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p1" /** * Interface defines for all options. Replace "n" with the UPPER_CASED diff --git a/util/ntp-keygen.1ntp-keygenman b/util/ntp-keygen.1ntp-keygenman index 5b076cebe2b1f..46bbad8294f6d 100644 --- a/util/ntp-keygen.1ntp-keygenman +++ b/util/ntp-keygen.1ntp-keygenman @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntp-keygen 1ntp-keygenman "19 Dec 2014" "ntp (4.2.8)" "User Commands" +.TH ntp-keygen 1ntp-keygenman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6fayVi/ag-hgaqUi) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xkaqsu/ag-9kairu) .\" -.\" It has been AutoGen-ed December 19, 2014 at 07:50:51 AM by AutoGen 5.18.5pre4 +.\" It has been AutoGen-ed February 4, 2015 at 02:43:55 AM by AutoGen 5.18.5pre4 .\" From the definitions ntp-keygen-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -1195,9 +1195,9 @@ libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. .PP .SH "AUTHORS" -The University of Delaware +The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1970-2014 The University of Delaware all rights reserved. +Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS It can take quite a while to generate some cryptographic values, diff --git a/util/ntp-keygen.1ntp-keygenmdoc b/util/ntp-keygen.1ntp-keygenmdoc index a3bb102526bd4..d70ca2c4e5e5d 100644 --- a/util/ntp-keygen.1ntp-keygenmdoc +++ b/util/ntp-keygen.1ntp-keygenmdoc @@ -1,9 +1,9 @@ -.Dd December 19 2014 +.Dd February 4 2015 .Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc) .\" -.\" It has been AutoGen-ed December 19, 2014 at 07:50:58 AM by AutoGen 5.18.5pre4 +.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4 .\" From the definitions ntp-keygen-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -1051,9 +1051,9 @@ libopts had an internal operational error. Please report it to autogen\-users@lists.sourceforge.net. Thank you. .El .Sh "AUTHORS" -The University of Delaware +The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1970\-2014 The University of Delaware all rights reserved. +Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS It can take quite a while to generate some cryptographic values, diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c index 6aed1a271a155..c16902161297e 100644 --- a/util/ntp-keygen.c +++ b/util/ntp-keygen.c @@ -108,6 +108,7 @@ #endif /* OPENSSL */ #include <ssl_applink.c> +#define _UC(str) ((char *)(intptr_t)(str)) /* * Cryptodefines */ @@ -131,19 +132,19 @@ * Prototypes */ FILE *fheader (const char *, const char *, const char *); -int gen_md5 (char *); +int gen_md5 (const char *); void followlink (char *, size_t); #ifdef AUTOKEY -EVP_PKEY *gen_rsa (char *); -EVP_PKEY *gen_dsa (char *); -EVP_PKEY *gen_iffkey (char *); -EVP_PKEY *gen_gqkey (char *); -EVP_PKEY *gen_mvkey (char *, EVP_PKEY **); +EVP_PKEY *gen_rsa (const char *); +EVP_PKEY *gen_dsa (const char *); +EVP_PKEY *gen_iffkey (const char *); +EVP_PKEY *gen_gqkey (const char *); +EVP_PKEY *gen_mvkey (const char *, EVP_PKEY **); void gen_mvserv (char *, EVP_PKEY **); -int x509 (EVP_PKEY *, const EVP_MD *, char *, char *, +int x509 (EVP_PKEY *, const EVP_MD *, char *, const char *, char *); void cb (int, int, void *); -EVP_PKEY *genkey (char *, char *); +EVP_PKEY *genkey (const char *, const char *); EVP_PKEY *readkey (char *, char *, u_int *, EVP_PKEY **); void writekey (char *, char *, u_int *, EVP_PKEY **); u_long asn2ntp (ASN1_TIME *); @@ -311,7 +312,7 @@ main( char pathbuf[MAXFILENAME + 1]; const char *scheme = NULL; /* digest/signature scheme */ const char *ciphername = NULL; /* to encrypt priv. key */ - char *exten = NULL; /* private extension */ + const char *exten = NULL; /* private extension */ char *grpkey = NULL; /* identity extension */ int nid; /* X509 digest/signature scheme */ FILE *fstr = NULL; /* file handle */ @@ -811,7 +812,7 @@ main( */ int gen_md5( - char *id /* file name id */ + const char *id /* file name id */ ) { u_char md5key[MD5SIZE + 1]; /* MD5 key */ @@ -958,7 +959,7 @@ readkey( */ EVP_PKEY * /* public/private key pair */ gen_rsa( - char *id /* file name id */ + const char *id /* file name id */ ) { EVP_PKEY *pkey; /* private key */ @@ -966,7 +967,7 @@ gen_rsa( FILE *str; fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus); - rsa = RSA_generate_key(modulus, 65537, cb, "RSA"); + rsa = RSA_generate_key(modulus, 65537, cb, _UC("RSA")); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -1011,7 +1012,7 @@ gen_rsa( */ EVP_PKEY * /* public/private key pair */ gen_dsa( - char *id /* file name id */ + const char *id /* file name id */ ) { EVP_PKEY *pkey; /* private key */ @@ -1026,7 +1027,7 @@ gen_dsa( "Generating DSA parameters (%d bits)...\n", modulus); RAND_bytes(seed, sizeof(seed)); dsa = DSA_generate_parameters(modulus, seed, sizeof(seed), NULL, - NULL, cb, "DSA"); + NULL, cb, _UC("DSA")); fprintf(stderr, "\n"); if (dsa == NULL) { fprintf(stderr, "DSA generate parameters fails\n%s\n", @@ -1113,7 +1114,7 @@ gen_dsa( */ EVP_PKEY * /* DSA cuckoo nest */ gen_iffkey( - char *id /* file name id */ + const char *id /* file name id */ ) { EVP_PKEY *pkey; /* private key */ @@ -1131,7 +1132,7 @@ gen_iffkey( modulus2); RAND_bytes(seed, sizeof(seed)); dsa = DSA_generate_parameters(modulus2, seed, sizeof(seed), NULL, - NULL, cb, "IFF"); + NULL, cb, _UC("IFF")); fprintf(stderr, "\n"); if (dsa == NULL) { fprintf(stderr, "DSA generate parameters fails\n%s\n", @@ -1291,7 +1292,7 @@ gen_iffkey( */ EVP_PKEY * /* RSA cuckoo nest */ gen_gqkey( - char *id /* file name id */ + const char *id /* file name id */ ) { EVP_PKEY *pkey; /* private key */ @@ -1307,7 +1308,7 @@ gen_gqkey( fprintf(stderr, "Generating GQ parameters (%d bits)...\n", modulus2); - rsa = RSA_generate_key(modulus2, 65537, cb, "GQ"); + rsa = RSA_generate_key(modulus2, 65537, cb, _UC("GQ")); fprintf(stderr, "\n"); if (rsa == NULL) { fprintf(stderr, "RSA generate keys fails\n%s\n", @@ -1500,7 +1501,7 @@ gen_gqkey( */ EVP_PKEY * /* DSA cuckoo nest */ gen_mvkey( - char *id, /* file name id */ + const char *id, /* file name id */ EVP_PKEY **evpars /* parameter list pointer */ ) { @@ -1925,7 +1926,7 @@ x509 ( EVP_PKEY *pkey, /* signing key */ const EVP_MD *md, /* signature/digest scheme */ char *gqpub, /* identity extension (hex string) */ - char *exten, /* private cert extension */ + const char *exten, /* private cert extension */ char *name /* subject/issuer name */ ) { @@ -1979,7 +1980,7 @@ x509 ( fprintf(stderr, "%s: %s\n", LN_basic_constraints, BASIC_CONSTRAINTS); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints, - BASIC_CONSTRAINTS); + _UC(BASIC_CONSTRAINTS)); if (!X509_add_ext(cert, ex, -1)) { fprintf(stderr, "Add extension field fails\n%s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1992,7 +1993,7 @@ x509 ( * be used for. */ fprintf(stderr, "%s: %s\n", LN_key_usage, KEY_USAGE); - ex = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, KEY_USAGE); + ex = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, _UC(KEY_USAGE)); if (!X509_add_ext(cert, ex, -1)) { fprintf(stderr, "Add extension field fails\n%s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -2027,7 +2028,7 @@ x509 ( if (exten != NULL) { fprintf(stderr, "%s: %s\n", LN_ext_key_usage, exten); ex = X509V3_EXT_conf_nid(NULL, NULL, - NID_ext_key_usage, exten); + NID_ext_key_usage, _UC(exten)); if (!X509_add_ext(cert, ex, -1)) { fprintf(stderr, "Add extension field fails\n%s\n", @@ -2138,8 +2139,8 @@ cb ( */ EVP_PKEY * /* public/private key pair */ genkey( - char *type, /* key type (RSA or DSA) */ - char *id /* file name id */ + const char *type, /* key type (RSA or DSA) */ + const char *id /* file name id */ ) { if (type == NULL) diff --git a/util/ntp-keygen.html b/util/ntp-keygen.html index bf55aa4075280..3b950ec843ebc 100644 --- a/util/ntp-keygen.html +++ b/util/ntp-keygen.html @@ -70,7 +70,7 @@ All other files are in PEM-encoded printable ASCII format so they can be embedded as MIME attachments in mail to other sites. - <p>This document applies to version 4.2.8 of <code>ntp-keygen</code>. + <p>This document applies to version 4.2.8p1 of <code>ntp-keygen</code>. <div class="node"> <p><hr> @@ -1085,7 +1085,7 @@ the usage text by passing it through a pager program. used to select the program, defaulting to <span class="file">more</span>. Both will exit with a status code of 0. -<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p486-RC +<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1-RC2 Usage: ntp-keygen [ -<flag> [<val>] | --<name>[{=| }<val>] ]... Flg Arg Option-Name Description -b Num imbits identity modulus bits diff --git a/util/ntp-keygen.man.in b/util/ntp-keygen.man.in index 2b0f2b538aba6..6242382b020cf 100644 --- a/util/ntp-keygen.man.in +++ b/util/ntp-keygen.man.in @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntp-keygen @NTP_KEYGEN_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands" +.TH ntp-keygen @NTP_KEYGEN_MS@ "04 Feb 2015" "ntp (4.2.8p1)" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6fayVi/ag-hgaqUi) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xkaqsu/ag-9kairu) .\" -.\" It has been AutoGen-ed December 19, 2014 at 07:50:51 AM by AutoGen 5.18.5pre4 +.\" It has been AutoGen-ed February 4, 2015 at 02:43:55 AM by AutoGen 5.18.5pre4 .\" From the definitions ntp-keygen-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -1195,9 +1195,9 @@ libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. .PP .SH "AUTHORS" -The University of Delaware +The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1970-2014 The University of Delaware all rights reserved. +Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS It can take quite a while to generate some cryptographic values, diff --git a/util/ntp-keygen.mdoc.in b/util/ntp-keygen.mdoc.in index d94c7db095fcb..da99a8deb64f5 100644 --- a/util/ntp-keygen.mdoc.in +++ b/util/ntp-keygen.mdoc.in @@ -1,9 +1,9 @@ -.Dd December 19 2014 +.Dd February 4 2015 .Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc) .\" -.\" It has been AutoGen-ed December 19, 2014 at 07:50:58 AM by AutoGen 5.18.5pre4 +.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4 .\" From the definitions ntp-keygen-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -1051,9 +1051,9 @@ libopts had an internal operational error. Please report it to autogen\-users@lists.sourceforge.net. Thank you. .El .Sh "AUTHORS" -The University of Delaware +The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1970\-2014 The University of Delaware all rights reserved. +Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS It can take quite a while to generate some cryptographic values, diff --git a/util/ntptime.c b/util/ntptime.c index dd5605ca7b306..5a6c1d1642a0b 100644 --- a/util/ntptime.c +++ b/util/ntptime.c @@ -98,15 +98,16 @@ main( volatile unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */ volatile unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */ volatile int fdigits = 6; /* fractional digits for us */ - int c; + size_t c; + int ch; int errflg = 0; int cost = 0; volatile int rawtime = 0; ZERO(ntx); progname = argv[0]; - while ((c = ntp_getopt(argc, argv, optargs)) != EOF) { - switch (c) { + while ((ch = ntp_getopt(argc, argv, optargs)) != EOF) { + switch (ch) { #ifdef MOD_MICRO case 'M': ntx.modes |= MOD_MICRO; @@ -467,7 +468,7 @@ timex_state( { static char buf[32]; - if (s >= 0 && s < COUNTOF(timex_states)) + if ((size_t)s < COUNTOF(timex_states)) return timex_states[s]; snprintf(buf, sizeof(buf), "TIME-#%d", s); return buf; |
