diff --git a/CMakeLists.txt b/CMakeLists.txt index 47f86ba..f86fbb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ else () set (CMAKE_C_STANDARD 99) endif () -set(VERSION 0.2.0) +set(VERSION 0.2.1) option(DEBUG "compile with debug symbol" OFF) option(BUNDLE_CIVETWEB "bundle civetweb with uts-server" OFF) diff --git a/ChangeLog.rst b/ChangeLog.rst index b5afea4..4cb1789 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,6 +1,11 @@ Changelogs ========== +0.2.1 +----- + +* [fix ] fix compilation for newer GCC (>10.2) (global variable definition issue + 0.2.0 ----- diff --git a/README.rst b/README.rst index 8f45419..eee3b8a 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,11 @@ Micro `RFC 3161 Time-Stamp `_ server writt ---- +Demo +---- + +A demo is accessible here: https://uts-server.kakwalab.ovh/ + License ------- diff --git a/inc/http.h b/inc/http.h index ed2c7bd..d3576bc 100644 --- a/inc/http.h +++ b/inc/http.h @@ -10,7 +10,6 @@ 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: 2774\r\n" \ "\r\n" \ "" \ "" \ diff --git a/inc/utils.h b/inc/utils.h index a18e6bb..3b90e3f 100644 --- a/inc/utils.h +++ b/inc/utils.h @@ -18,7 +18,3 @@ int set_params(rfc3161_context *ct, char *conf_file, char *conf_wd); static char *rand_string(char *str, size_t size); void free_uts_context(rfc3161_context *ct); const char *null_undef(const char *in); - -// some global variable to handle signals -int g_uts_sig_up; -int g_uts_sig; diff --git a/src/lib/http.c b/src/lib/http.c index 60c2915..ea402e9 100644 --- a/src/lib/http.c +++ b/src/lib/http.c @@ -9,6 +9,9 @@ #include #include +extern int g_uts_sig_up; +extern int g_uts_sig; + static char *rand_string(char *str, size_t size) { const char charset[] = "1234567890ABCDEF"; if (size) { diff --git a/src/lib/rfc3161.c b/src/lib/rfc3161.c index e8b6865..3cf0cb2 100644 --- a/src/lib/rfc3161.c +++ b/src/lib/rfc3161.c @@ -269,7 +269,7 @@ int create_response(rfc3161_context *ct, char *query, int query_len, BN_free(serial_bn); } else { serial_hex = calloc(SERIAL_ID_SIZE, sizeof(char)); - strncpy(serial_hex, " NO ID ", SERIAL_ID_SIZE + 2); + strncpy(serial_hex, " NO ID ", SERIAL_ID_SIZE + 4); } #endif #ifdef OPENSSL_API_1_0 diff --git a/src/lib/utils.c b/src/lib/utils.c index cb18d66..5543c5b 100644 --- a/src/lib/utils.c +++ b/src/lib/utils.c @@ -12,6 +12,10 @@ #include #include +// some global variable to handle signals +int g_uts_sig_up; +int g_uts_sig; + static void signal_handler_general(int sig_num) { g_uts_sig = sig_num; }