Commit graph

6 commits

Author SHA1 Message Date
bccd467968 Configuration - Validate handlers for certificates
* Handlers referenced in certificate file sections must exist. No
    handlers may be referenced more than once by the same section.
2021-12-04 13:22:13 +01:00
3266f3f818 Fixed handlers configuration 2021-12-04 10:44:57 +01:00
3e088d4af7 New configuration for commands/handlers to run after updates
* The new configuration includes specific commands per file, as well
    as handlers that can be triggered by updates but will only ever run
    once.
  * For now, commands from the pre_commands section are executed, the
    rest is ignored
2021-12-04 10:40:15 +01:00
658ee30bc6 Server socket
* The UNIX socket will be listened on for control messages
  * A message containing a single 'Q' will cause it to exit
  * A message containing a single 'R' will cause a configuration reload.
    If the new configuration is incorrect, the old configuration will be
    kept. A new socket will be opened if the path has changed (failure
    when doing so will restore the previous configuration as well).
  * A message starting with 'U' requests an update. The next character
    may be '!' to force updates or anything else to update only as
    needed. The rest of the string is the selector: either a DN or '*'.
  * The selector is ignored in this commit; all certificates are
    re-examined.
2021-11-06 17:12:08 +01:00
f971c1e961 Configuration validation
* Validate most of the entries in the configuration file, with the
    exception of DNs / RDNs.
  * Use the govalidator library for DNS names and file paths
2021-10-31 11:30:39 +01:00
610cbf28f8 Configuration file reading
* An example configuration file has been added.
  * The data structure that corresponds to the configuration has been
    defined, and functions to load it have been added.
  * Logging using logrus and command line arguments that configure
    logging and set the configuration file's path have been added.
  * Opening the UNIX socket has been implemented.
2021-10-30 17:07:06 +02:00