Home | History | Annotate | Line # | Download | only in ntpd
ntp.keys.def revision 1.1
      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  christos one or more keys numbered between 1 and 65534
     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  christos .D1 Ar keyno type key
     47  1.1  christos .Pp
     48  1.1  christos where
     49  1.1  christos .Ar keyno
     50  1.1  christos is a positive integer (between 1 and 65534),
     51  1.1  christos .Ar type
     52  1.1  christos is the message digest algorithm,
     53  1.1  christos and
     54  1.1  christos .Ar key
     55  1.1  christos is the key itself.
     56  1.1  christos .Pp
     57  1.1  christos The
     58  1.1  christos .Ar key
     59  1.1  christos may be given in a format
     60  1.1  christos controlled by the
     61  1.1  christos .Ar type
     62  1.1  christos field.
     63  1.1  christos The
     64  1.1  christos .Ar type
     65  1.1  christos .Li MD5
     66  1.1  christos is always supported.
     67  1.1  christos If
     68  1.1  christos .Li ntpd
     69  1.1  christos was built with the OpenSSL library
     70  1.1  christos then any digest library supported by that library may be specified.
     71  1.1  christos However, if compliance with FIPS 140-2 is required the
     72  1.1  christos .Ar type
     73  1.1  christos must be either
     74  1.1  christos .Li SHA
     75  1.1  christos or
     76  1.1  christos .Li SHA1 .
     77  1.1  christos .Pp
     78  1.1  christos What follows are some key types, and corresponding formats:
     79  1.1  christos .Pp
     80  1.1  christos .Bl -tag -width RMD160 -compact
     81  1.1  christos .It Li MD5
     82  1.1  christos The key is 1 to 16 printable characters terminated by
     83  1.1  christos an EOL,
     84  1.1  christos whitespace,
     85  1.1  christos or
     86  1.1  christos a
     87  1.1  christos .Li #
     88  1.1  christos (which is the "start of comment" character).
     89  1.1  christos .Pp
     90  1.1  christos .It Li SHA
     91  1.1  christos .It Li SHA1
     92  1.1  christos .It Li RMD160
     93  1.1  christos The key is a hex-encoded ASCII string of 40 characters,
     94  1.1  christos which is truncated as necessary.
     95  1.1  christos .El
     96  1.1  christos .Pp
     97  1.1  christos Note that the keys used by the
     98  1.1  christos .Xr ntpq 8
     99  1.1  christos and
    100  1.1  christos .Xr ntpdc 8
    101  1.1  christos programs are checked against passwords
    102  1.1  christos requested by the programs and entered by hand,
    103  1.1  christos so it is generally appropriate to specify these keys in ASCII format.
    104  1.1  christos 	_END_PROG_MDOC_DESCRIP;
    105  1.1  christos };
    106  1.1  christos 
    107  1.1  christos doc-section	= {
    108  1.1  christos   ds-type	= 'FILES';
    109  1.1  christos   ds-format	= 'mdoc';
    110  1.1  christos   ds-text	= <<- _END_MDOC_FILES
    111  1.1  christos .Bl -tag -width /etc/ntp.keys -compact
    112  1.1  christos .It Pa /etc/ntp.keys
    113  1.1  christos the default name of the configuration file
    114  1.1  christos .El
    115  1.1  christos 	_END_MDOC_FILES;
    116  1.1  christos };
    117  1.1  christos 
    118  1.1  christos doc-section	= {
    119  1.1  christos   ds-type	= 'SEE ALSO';
    120  1.1  christos   ds-format	= 'mdoc';
    121  1.1  christos   ds-text	= <<- _END_MDOC_SEE_ALSO
    122  1.1  christos .Xr ntp.conf 5 ,
    123  1.1  christos .Xr ntpd 1ntpdmdoc ,
    124  1.1  christos .Xr ntpdate 1ntpdatemdoc ,
    125  1.1  christos .Xr ntpdc 1ntpdcmdoc ,
    126  1.1  christos .Xr sntp 1sntpmdoc
    127  1.1  christos 	_END_MDOC_SEE_ALSO;
    128  1.1  christos };
    129  1.1  christos 
    130  1.1  christos /*
    131  1.1  christos doc-section	= {
    132  1.1  christos   ds-type	= 'BUGS';
    133  1.1  christos   ds-format	= 'mdoc';
    134  1.1  christos   ds-text	= <<- _END_MDOC_BUGS
    135  1.1  christos .Xr ntpd 8
    136  1.1  christos has gotten rather fat.
    137  1.1  christos While not huge, it has gotten larger than might
    138  1.1  christos be desirable for an elevated-priority daemon running on a workstation,
    139  1.1  christos particularly since many of the fancy features which consume the space
    140  1.1  christos were designed more with a busy primary server, rather than a high
    141  1.1  christos stratum workstation, in mind.
    142  1.1  christos 	_END_MDOC_BUGS;
    143  1.1  christos };
    144  1.1  christos */
    145  1.1  christos 
    146  1.1  christos doc-section	= {
    147  1.1  christos   ds-type	= 'NOTES';
    148  1.1  christos   ds-format	= 'mdoc';
    149  1.1  christos   ds-text	= <<- _END_MDOC_NOTES
    150  1.1  christos This document corresponds to version #VERSION# of NTP.
    151  1.1  christos This document was derived from FreeBSD.
    152  1.1  christos 	_END_MDOC_NOTES;
    153  1.1  christos };
    154