mirror of
https://github.com/kakwa/uts-server
synced 2025-07-04 20:47:09 +02:00
code cleaning an reorganization
This commit is contained in:
parent
f92cb7213e
commit
a6d73bfd49
6 changed files with 47 additions and 76 deletions
|
@ -1,4 +1,8 @@
|
|||
#include <stdbool.h>
|
||||
#include "utils.h"
|
||||
|
||||
struct tuser_data {
|
||||
char *first_message;
|
||||
};
|
||||
|
||||
int http_server_start(char *conffile, char *conf_wd, bool stdout_dbg);
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
#include "context.h"
|
||||
|
||||
/* Name of config entry that defines the OID file. */
|
||||
#define ENV_OID_FILE "oid_file"
|
||||
#define OID_SECTION "oids"
|
||||
|
||||
// number of char we get to log for the serial
|
||||
#define SERIAL_ID_SIZE 8
|
||||
|
||||
#define B_FORMAT_TEXT 0x8000
|
||||
#define FORMAT_UNDEF 0
|
||||
|
@ -23,11 +26,7 @@
|
|||
static ASN1_OBJECT *txt2obj(const char *oid);
|
||||
|
||||
/* Reply related functions. */
|
||||
static int reply_command(CONF *conf, char *section, char *engine, char *query,
|
||||
char *passin, char *inkey, const EVP_MD *md,
|
||||
char *signer, char *chain, const char *policy,
|
||||
char *in, int token_in, char *out, int token_out,
|
||||
int text);
|
||||
static ASN1_INTEGER *serial_cb(TS_RESP_CTX *ctx, void *data);
|
||||
static TS_RESP *read_PKCS7(BIO *in_bio);
|
||||
int create_response(rfc3161_context *ct, char *query, int query_len,
|
||||
TS_RESP_CTX *resp_ctx, size_t *resp_size,
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
#include "rfc3161.h"
|
||||
|
||||
typedef struct _code {
|
||||
char *c_name;
|
||||
int c_val;
|
||||
} CODE;
|
||||
|
||||
static void signal_handler_general(int sig_num);
|
||||
static void signal_handler_up(int sig_num);
|
||||
void skeleton_daemon();
|
||||
int init_pid(char *pidfile_path);
|
||||
int write_pid(char *pidfile_path);
|
||||
|
@ -9,5 +16,7 @@ void log_hex(rfc3161_context *ct, int priority, char *id,
|
|||
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);
|
||||
|
||||
// some global variable to handle signals
|
||||
int g_uts_sig_up;
|
||||
int g_uts_sig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue