Debian Codegraph @

src/canl_mech_ssl.h

raw
1 #ifndef _CANL_MECH_SSL_H
2 #define _CANL_MECH_SSL_H
3
4 #include <openssl/ssl.h>
5 #include <openssl/x509.h>
6 #include <openssl/x509v3.h>
7 #include <openssl/evp.h>
8 #include <openssl/err.h>
9 #include <openssl/safestack.h>
10
11 typedef struct _cert_key_store {
12 X509 *cert;
13 EVP_PKEY *key;
14 STACK_OF(X509) *chain;
15 } cert_key_store;
16
17 typedef struct _mech_glb_ctx
18 {
19 void *mech_ctx; //like SSL_CTX *
20 unsigned int flags;
21 char *ca_dir;
22 char *ca_file;
23 char *crl_dir;
24 cert_key_store *cert_key;
25 canl_proxy_verify_desc *pvd_ctx;
26 char *ocsp_url;
27 } mech_glb_ctx;
28
29 int do_set_ctx_own_cert_file(glb_ctx *cc, mech_glb_ctx *m_ctx,
30 char *cert, char *key, char * proxy);
31 int set_key_file(glb_ctx *cc, EVP_PKEY **to, const char *key);
32 int set_cert_file(glb_ctx *cc, X509 **to, const char *cert);
33 int set_cert_chain_file(glb_ctx *cc, STACK_OF(X509) **to, const char *cert);
34 void pkey_dup(EVP_PKEY **to, EVP_PKEY *from);
35
36 #endif