summaryrefslogtreecommitdiff
path: root/src/cert_session.h
blob: 896384b554c40016188c0f88f3e976c410d26433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*************************************************************************
	> File Name: cert_session.h
	> Author:
	> Mail:
	> Created Time: Fri 01 Jun 2018 02:01:08 AM PDT
 ************************************************************************/

#ifndef _CERT_SESSION_H
#define _CERT_SESSION_H

#include "event_struct.h"
#include "MESA_list_queue.h"
#include "rt_sync.h"

struct x509_object_ctx
{
    X509 *root;
    EVP_PKEY *key;

    X509 *insec_root;
    EVP_PKEY *insec_key;
};

typedef struct {
    int  id;

    rt_pthread pid;        /* unique ID of this thread */

    evutil_socket_t accept_fd;

    rt_pthread_attr *attr;

	struct event_base *base;

    struct x509_object_ctx def;

    struct redisAsyncContext *cl_ctx;

    struct redisContext *sync;

    void * (*routine)(void *);  /** Executive entry */

    int field_ids;    /* dispaly */

    int column_ids;

    uint64_t diffTime;

} libevent_thread;

int cert_session_init();

void sigproc(int __attribute__((__unused__))sig);

#endif