#include "utils.h" #include struct tuser_data { char *first_message; }; int http_server_start(char *conffile, char *conf_wd, bool stdout_dbg); #define STATIC_PAGE \ "HTTP/1.1 200 OK\r\n" \ "Content-Type: text/html\r\n" \ "Content-Length: 2509\r\n" \ "\r\n" \ "" \ "" \ " " \ " " \ " " \ " " \ "" \ "" \ "" \ "
" \ " uts-server, a simple RFC 3161 timestamp server" \ "
" \ "
" \ " For timestamping a file with OpenSSL and curl, run the following " \ "commands" \ " (setting the $UTS_SERVER_URL, $FILE and $FILE_TIMESTAMP variables):" \ "
" \ " openssl ts -query -data \"$FILE\" -out " \ "\"ts_req.ts\";
" \ " curl \"$UTS_SERVER_URL\" -H " \ "\"Content-Type: application/timestamp-query\" \\
" \ " -f -g --data-binary \"@ts_req.ts\" -o \"$FILE_TIMESTAMP\"" \ "
" \ " For verifying the timestamp with OpenSSL, download the CA, and run " \ "the following command:" \ "
" \ " openssl ts -verify -in \"$FILE_TIMESTAMP\" -data \"$FILE\" -CAfile ca.pem" \ "
" \ " " \ "
" \ "
" \ "
" \ " uts-server" \ " • © 2019 • Pierre-François Carpentier • Released under the MIT " \ "License" \ "
" \ "
" \ "" \ ""