fixing compilation errors and warnings

This commit is contained in:
kakwa 2021-04-07 15:23:54 +02:00
parent 86d9094cca
commit 4975f90af6
4 changed files with 8 additions and 5 deletions

View File

@ -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); static char *rand_string(char *str, size_t size);
void free_uts_context(rfc3161_context *ct); void free_uts_context(rfc3161_context *ct);
const char *null_undef(const char *in); const char *null_undef(const char *in);
// some global variable to handle signals
int g_uts_sig_up;
int g_uts_sig;

View File

@ -9,6 +9,9 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
extern int g_uts_sig_up;
extern int g_uts_sig;
static char *rand_string(char *str, size_t size) { static char *rand_string(char *str, size_t size) {
const char charset[] = "1234567890ABCDEF"; const char charset[] = "1234567890ABCDEF";
if (size) { if (size) {

View File

@ -269,7 +269,7 @@ end:
BN_free(serial_bn); BN_free(serial_bn);
} else { } else {
serial_hex = calloc(SERIAL_ID_SIZE, sizeof(char)); 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 #endif
#ifdef OPENSSL_API_1_0 #ifdef OPENSSL_API_1_0

View File

@ -12,6 +12,10 @@
#include <syslog.h> #include <syslog.h>
#include <unistd.h> #include <unistd.h>
// some global variable to handle signals
int g_uts_sig_up;
int g_uts_sig;
static void signal_handler_general(int sig_num) { static void signal_handler_general(int sig_num) {
g_uts_sig = sig_num; g_uts_sig = sig_num;
} }