1 1.1 christos /* -*- Mode: Text -*- */ 2 1.1 christos 3 1.1 christos autogen definitions options; 4 1.1 christos 5 1.1 christos #include copyright.def 6 1.1 christos #include version.def 7 1.1 christos 8 1.1 christos // We want the synopsis to be "/etc/ntp.keys" but we need the prog-name 9 1.1 christos // to be ntp.keys - the latter is also how autogen produces the output 10 1.1 christos // file name. 11 1.1 christos prog-name = "ntp.keys"; 12 1.1 christos file-path = "/etc/ntp.keys"; 13 1.1 christos prog-title = "NTP symmetric key file format"; 14 1.1 christos 15 1.1 christos /* explain: Additional information whenever the usage routine is invoked */ 16 1.1 christos explain = <<- _END_EXPLAIN 17 1.1 christos _END_EXPLAIN; 18 1.1 christos 19 1.1 christos doc-section = { 20 1.1 christos ds-type = 'DESCRIPTION'; 21 1.1 christos ds-format = 'mdoc'; 22 1.1 christos ds-text = <<- _END_PROG_MDOC_DESCRIP 23 1.1 christos This document describes the format of an NTP symmetric key file. 24 1.1 christos For a description of the use of this type of file, see the 25 1.1 christos .Qq Authentication Support 26 1.1 christos section of the 27 1.1 christos .Xr ntp.conf 5 28 1.1 christos page. 29 1.1 christos .Pp 30 1.1 christos .Xr ntpd 8 31 1.1 christos reads its keys from a file specified using the 32 1.1 christos .Fl k 33 1.1 christos command line option or the 34 1.1 christos .Ic keys 35 1.1 christos statement in the configuration file. 36 1.1 christos While key number 0 is fixed by the NTP standard 37 1.1 christos (as 56 zero bits) 38 1.1 christos and may not be changed, 39 1.1.1.5 christos one or more keys numbered between 1 and 65535 40 1.1 christos may be arbitrarily set in the keys file. 41 1.1 christos .Pp 42 1.1 christos The key file uses the same comment conventions 43 1.1 christos as the configuration file. 44 1.1 christos Key entries use a fixed format of the form 45 1.1 christos .Pp 46 1.1.1.3 christos .D1 Ar keyno type key opt_IP_list 47 1.1 christos .Pp 48 1.1 christos where 49 1.1 christos .Ar keyno 50 1.1.1.5 christos is a positive integer (between 1 and 65535), 51 1.1 christos .Ar type 52 1.1 christos is the message digest algorithm, 53 1.1 christos .Ar key 54 1.1.1.3 christos is the key itself, and 55 1.1.1.3 christos .Ar opt_IP_list 56 1.1.1.3 christos is an optional comma-separated list of IPs 57 1.1.1.4 christos where the 58 1.1.1.4 christos .Ar keyno 59 1.1.1.4 christos should be trusted. 60 1.1.1.3 christos that are allowed to serve time. 61 1.1.1.4 christos Each IP in 62 1.1.1.4 christos .Ar opt_IP_list 63 1.1.1.4 christos may contain an optional 64 1.1.1.4 christos .Cm /subnetbits 65 1.1.1.4 christos specification which identifies the number of bits for 66 1.1.1.4 christos the desired subnet of trust. 67 1.1.1.3 christos If 68 1.1.1.3 christos .Ar opt_IP_list 69 1.1.1.3 christos is empty, 70 1.1.1.4 christos any properly-authenticated message will be 71 1.1.1.3 christos accepted. 72 1.1 christos .Pp 73 1.1 christos The 74 1.1 christos .Ar key 75 1.1 christos may be given in a format 76 1.1 christos controlled by the 77 1.1 christos .Ar type 78 1.1 christos field. 79 1.1 christos The 80 1.1 christos .Ar type 81 1.1 christos .Li MD5 82 1.1 christos is always supported. 83 1.1 christos If 84 1.1 christos .Li ntpd 85 1.1 christos was built with the OpenSSL library 86 1.1 christos then any digest library supported by that library may be specified. 87 1.1 christos However, if compliance with FIPS 140-2 is required the 88 1.1 christos .Ar type 89 1.1 christos must be either 90 1.1 christos .Li SHA 91 1.1 christos or 92 1.1 christos .Li SHA1 . 93 1.1 christos .Pp 94 1.1 christos What follows are some key types, and corresponding formats: 95 1.1 christos .Pp 96 1.1 christos .Bl -tag -width RMD160 -compact 97 1.1 christos .It Li MD5 98 1.1 christos The key is 1 to 16 printable characters terminated by 99 1.1 christos an EOL, 100 1.1 christos whitespace, 101 1.1 christos or 102 1.1 christos a 103 1.1 christos .Li # 104 1.1 christos (which is the "start of comment" character). 105 1.1 christos .Pp 106 1.1 christos .It Li SHA 107 1.1 christos .It Li SHA1 108 1.1 christos .It Li RMD160 109 1.1 christos The key is a hex-encoded ASCII string of 40 characters, 110 1.1 christos which is truncated as necessary. 111 1.1 christos .El 112 1.1 christos .Pp 113 1.1 christos Note that the keys used by the 114 1.1 christos .Xr ntpq 8 115 1.1 christos and 116 1.1 christos .Xr ntpdc 8 117 1.1 christos programs are checked against passwords 118 1.1 christos requested by the programs and entered by hand, 119 1.1 christos so it is generally appropriate to specify these keys in ASCII format. 120 1.1 christos _END_PROG_MDOC_DESCRIP; 121 1.1 christos }; 122 1.1 christos 123 1.1 christos doc-section = { 124 1.1 christos ds-type = 'FILES'; 125 1.1 christos ds-format = 'mdoc'; 126 1.1 christos ds-text = <<- _END_MDOC_FILES 127 1.1 christos .Bl -tag -width /etc/ntp.keys -compact 128 1.1 christos .It Pa /etc/ntp.keys 129 1.1 christos the default name of the configuration file 130 1.1 christos .El 131 1.1 christos _END_MDOC_FILES; 132 1.1 christos }; 133 1.1 christos 134 1.1 christos doc-section = { 135 1.1 christos ds-type = 'SEE ALSO'; 136 1.1 christos ds-format = 'mdoc'; 137 1.1 christos ds-text = <<- _END_MDOC_SEE_ALSO 138 1.1 christos .Xr ntp.conf 5 , 139 1.1 christos .Xr ntpd 1ntpdmdoc , 140 1.1 christos .Xr ntpdate 1ntpdatemdoc , 141 1.1 christos .Xr ntpdc 1ntpdcmdoc , 142 1.1 christos .Xr sntp 1sntpmdoc 143 1.1 christos _END_MDOC_SEE_ALSO; 144 1.1 christos }; 145 1.1 christos 146 1.1 christos /* 147 1.1 christos doc-section = { 148 1.1 christos ds-type = 'BUGS'; 149 1.1 christos ds-format = 'mdoc'; 150 1.1 christos ds-text = <<- _END_MDOC_BUGS 151 1.1 christos .Xr ntpd 8 152 1.1 christos has gotten rather fat. 153 1.1 christos While not huge, it has gotten larger than might 154 1.1 christos be desirable for an elevated-priority daemon running on a workstation, 155 1.1 christos particularly since many of the fancy features which consume the space 156 1.1 christos were designed more with a busy primary server, rather than a high 157 1.1 christos stratum workstation, in mind. 158 1.1 christos _END_MDOC_BUGS; 159 1.1 christos }; 160 1.1 christos */ 161 1.1 christos 162 1.1 christos doc-section = { 163 1.1 christos ds-type = 'NOTES'; 164 1.1 christos ds-format = 'mdoc'; 165 1.1 christos ds-text = <<- _END_MDOC_NOTES 166 1.1 christos This document was derived from FreeBSD. 167 1.1 christos _END_MDOC_NOTES; 168 1.1 christos }; 169