mirror of
https://github.com/kakwa/uts-server
synced 2025-01-07 12:14:31 +01:00
kakwa
e948177a41
enabling multi-threads support
as TS_RESP_CTX is not thread safe, this commit implement a pool of TS_RESP_CTX in which a thread can pick one in a thread safe maner. * implement a ts_resp_ctx_wrapper containing a TS_RESP_CTX and a lock and bool to mark the availability of the TS_RESP_CTX * implement the get_ctxw to recover a given TS_RESP_CTX in a thread safe maner * adapt the rest of the code to accomodate the new way of doing things * set the default number of threads to 10 as it's now safe to do so
uts-server
Micro timestamp server (RFC 3161) written in C
Status
Alpha
Dependencies
- OpenSSL (https://github.com/openssl/openssl)
- civetweb (https://github.com/civetweb/civetweb)
License
Released under the MIT Public License
Playing with it
# create some test certificates
$ ./tests/cfg/pki/create_tsa_certs
# launching the timestamp server with test configuration (debug mode)
$ ./uts-server -c tests/cfg/uts-server.cnf -D
# in another shell, launching a timestamp client on the README.md file
$ ./goodies/timestamp-file.sh -i README.md -u http://localhost:2020 -r -O "-cert";
Usage
$ ./uts-server --help
Usage: uts-server [OPTION...] -c CONFFILE [-d] [-D] [-p <pidfile>]
UTS micro timestamp server (RFC 3161)
-c, --conffile=CONFFILE Path to configuration file
-d, --daemonize Launch as a daemon
-D, --debug STDOUT debugging
-p, --pidfile=PIDFILE Path to pid file
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Report bugs to Pierre-Francois Carpentier <carpentier.pf@gmail.com>.
Configuration
Building
$ cmake .
$ make -j 2
Playing with it
# building with civetweb embedded (will recover civetweb from github)
$ cmake . -DBUNDLE_CIVETWEB=ON
$ make
# create some test certificates
$ ./tests/cfg/pki/create_tsa_certs
# launching the timestamp server with test configuration in debug mode
$ ./uts-server -c tests/cfg/uts-server.cnf -D
# in another shell, launching a timestamp script on the README.md file
$ ./goodies/timestamp-file.sh -i README.md -u http://localhost:2020 -r -O "-cert";
Languages
C
76.4%
Shell
12.4%
CMake
6.5%
HTML
3.7%
Python
1%