cacert-codedocs/source/DIR-CommModule.rst

6.1 KiB

Directory CommModule

This directory contains the CommModule that is implemented in Perl:

CommModule/client.pl

CommModule/commdaemon

commdaemon is a script to run client.pl <CommModule/client.pl> or server.pl <CommModule/server.pl>.

This bash script is automatically restarting the {script} given as the first parameter as long as a file {script}-active exists. Informational messages and errors are logged to syslog via logger.

The script is most probably used to recover from crashed scripts. This could be implemented via supervisor or systemd instead of a custom script.

CommModule/commmodule

commodule is a System V style init script for startup/shutdown of CommModule

On test.cacert.org two slightly different versions are deployed in /etc/init.d the first version starts client.pl <CommModule/client.pl> in /home/cacert/www/CommModule/ and the second variant starts server.pl <CommModule/server.pl> in /home/signer/cacert-devel/CommModule/.

CommModule/logclean.sh

logclean.sh is a maintenance script for logfiles generated by CommModule.

The logclean.sh script performs log rotation of signer logfiles.

discuss replacement of this script with logrotate and a custom logrotate.conf for the signer

CommModule/serial.conf

serial.conf serial port configuration file

This file is read and written by both client.pl <CommModule/client.pl> and server.pl <CommModule/server.pl> therefore both cannot be run from the same directory without interfering with each other.

add a serial.conf template and move the actual serial.conf into configuration management

CommModule/server.pl

server.pl is the signing server software.

This script implements the signer (server) side of the signer protocol <signer> and performs the actual signing operations.

The script contains a some code that is duplicated by client.pl <CommModule/client.pl>.

Note

The server.pl used on test.cacert.org is different from the version in the cacert-devel repository. The git origin is recorded as git://git-cacert.it-sls.de/cacert-devel.git and there are some small uncommitted changes too.

get the versions of server.pl on git.cacert.org, the real production signer and the cacert-devel repository synchronized

CommModule/usbclient.pl

usbclient.pl is an obsoleted USB version of client.pl <CommModule/client.pl> above

remove unused file (usbclient.pl)