diff options
author | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2025-05-04 18:18:07 +0200 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2025-05-04 20:44:55 +0200 |
commit | 0194e90af5fa5e54197bd75669353c500a756e18 (patch) | |
tree | 36ac4f46a961fb4eeedbca160ea205f56330020a /security/timestamp-authority/files/timestamp-authority.in | |
parent | security/certificate_maker: New port (diff) |
security/timestamp-authority: New port
Service for issuing RFC 3161 timestamps
Trusted timestamping is a process that has been around for some time. It
provides a timestamp record of when a document was created or modified.
A timestamp authority creates signed timestamps using public key
infrastructure. The operator of the timestamp authority must secure the
signing key material to prevent unauthorized timestamp signing.
A timestamp authority should also verify its own clock. We provide a
configuration to periodically check the current time against well-known
NTP sources.
WWW: https://sigstore.dev/
Diffstat (limited to 'security/timestamp-authority/files/timestamp-authority.in')
-rw-r--r-- | security/timestamp-authority/files/timestamp-authority.in | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/security/timestamp-authority/files/timestamp-authority.in b/security/timestamp-authority/files/timestamp-authority.in new file mode 100644 index 000000000000..dc39614451c1 --- /dev/null +++ b/security/timestamp-authority/files/timestamp-authority.in @@ -0,0 +1,46 @@ +#!/bin/sh + +# PROVIDE: timestamp-server +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# timestamp-server_enable (bool): Set it to YES to enable timestamp-server. +# Default is "NO". +# timestamp-server_user (user): Set user to run timestamp-server. +# Default is "timestamp-server". +# timestamp-server_group (group): Set group to run timestamp-server. +# Default is "timestamp-server". +# timestamp-server_config (file): Set timestamp-server config file. +# Default is "%%PREFIX%%/etc/timestamp-server/timestamp-server.yaml". + +. /etc/rc.subr + +name=timestamp-server +rcvar=timestamp-server_enable + +load_rc_config $name + +: ${timestamp-server_enable:="NO"} +: ${timestamp-server_user:="timestamp-authority"} +: ${timestamp-server_group:="timestamp-authority"} +: ${timestamp-server_config:="%%PREFIX%%/etc/timestamp-authority/timestamp-server.yaml"} + +pidfile=/var/run/timestamp-server.pid +procname="%%PREFIX%%/bin/timestamp-server" +command="/usr/sbin/daemon" +command_args="-f -t ${name} -p ${pidfile} ${procname} serve -config=${timestamp-server_config}" + +start_precmd=timestamp-server_startprecmd +required_files="$timestamp-server_config" + +timestamp-server_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${timestamp-server_user} -g ${timestamp-server_group} /dev/null ${pidfile}; + fi +} + +run_rc_command "$1" |