This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-certstore/program/include/cert_conf.h

101 lines
1.9 KiB
C
Raw Normal View History

/*************************************************************************
> File Name: cert_conf.h
> Author:
> Mail:
> Created Time: Fri 01 Jun 2018 12:06:26 AM PDT
************************************************************************/
#ifndef _CERT_INIT_H
#define _CERT_INIT_H
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <event.h>
#include <openssl/x509.h>
#include <openssl/evp.h>
#include <MESA/Maat_rule.h>
#include <MESA/MESA_htable.h>
#include "rlib_load.h"
#define CT_PATH_MAX 256
#define CT_ARRARY_LEN (CT_PATH_MAX/2)
#define CT_STRING_MAX 1024
struct tfe_http_request{
#define DATALEN 128
int thread_id;
int is_valid;
char *odata;
X509 *origin;
int keyring_id;
2019-08-08 16:06:23 +08:00
char *sni;
char rkey[DATALEN];
struct timespec create_time;
struct evhttp_request *evh_req;
};
struct pxy_obj_keyring{
int keyring_id;
int use_hsm;
atomic64_t ref_cnt;
uint64_t expire_time;
time_t op_time;
EVP_PKEY *key;
X509 *issuer;
char v3_ctl[CT_STRING_MAX];
char keyring_type[CT_ARRARY_LEN];
char public_algo[CT_STRING_MAX];
CK_SESSION_HANDLE session;
STACK_OF(X509) *stack_ca;
};
struct pxy_profile_hsm
{
int profile_id;
int ref_cnt;
char *server_ip;
char *passwd;
pthread_mutex_t lock;
};
enum kerying_profile_table
{
POLICY_PROFLIE_TABLE_KERING,
POLICY_PROFILE_TABLE_HSM,
POLICY_PROFILE_TABLE_MAX
};
struct cert_store_policy{
2019-08-21 14:03:53 +08:00
int mode;
unsigned int enable;
unsigned int local_debug;
unsigned int thread_nu;
unsigned int expire_after;
Maat_feather_t feather;
int plolicy_table_id[POLICY_PROFILE_TABLE_MAX];
uint16_t e_port;
uint16_t store_port;
char store_ip[46];
char password[128];
char label[128];
char ca_path[128];
char uninsec_path[128];
};
extern struct cert_store_policy * g_certstore_policy;
void cert_store_init_config(struct cert_store_policy *certstore_policy, const char *main_profile);
#endif