forked from mirrors/kore
even more ssl to tls terminology.
This commit is contained in:
parent
98f0c41f38
commit
a0c545884f
|
@ -128,7 +128,7 @@ TAILQ_HEAD(netbuf_head, netbuf);
|
||||||
#define KORE_TYPE_TASK 4
|
#define KORE_TYPE_TASK 4
|
||||||
|
|
||||||
#define CONN_STATE_UNKNOWN 0
|
#define CONN_STATE_UNKNOWN 0
|
||||||
#define CONN_STATE_SSL_SHAKE 1
|
#define CONN_STATE_TLS_SHAKE 1
|
||||||
#define CONN_STATE_ESTABLISHED 2
|
#define CONN_STATE_ESTABLISHED 2
|
||||||
#define CONN_STATE_DISCONNECTING 3
|
#define CONN_STATE_DISCONNECTING 3
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ void kore_domain_closelogs(void);
|
||||||
void *kore_module_getsym(const char *, struct kore_runtime **);
|
void *kore_module_getsym(const char *, struct kore_runtime **);
|
||||||
void kore_domain_load_crl(void);
|
void kore_domain_load_crl(void);
|
||||||
void kore_domain_keymgr_init(void);
|
void kore_domain_keymgr_init(void);
|
||||||
void kore_domain_sslstart(struct kore_domain *);
|
void kore_domain_tlsinit(struct kore_domain *);
|
||||||
void kore_module_load(const char *, const char *, int);
|
void kore_module_load(const char *, const char *, int);
|
||||||
void kore_domain_callback(void (*cb)(struct kore_domain *));
|
void kore_domain_callback(void (*cb)(struct kore_domain *));
|
||||||
int kore_module_handler_new(const char *, const char *,
|
int kore_module_handler_new(const char *, const char *,
|
||||||
|
|
|
@ -108,7 +108,7 @@ static int configure_task_threads(char *);
|
||||||
static int configure_python_import(char *);
|
static int configure_python_import(char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void domain_sslstart(void);
|
static void domain_tls_init(void);
|
||||||
static void kore_parse_config_file(const char *);
|
static void kore_parse_config_file(const char *);
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -255,7 +255,7 @@ kore_parse_config_file(const char *fpath)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!strcmp(p, "}") && current_domain != NULL)
|
if (!strcmp(p, "}") && current_domain != NULL)
|
||||||
domain_sslstart();
|
domain_tls_init();
|
||||||
|
|
||||||
if (!strcmp(p, "}")) {
|
if (!strcmp(p, "}")) {
|
||||||
lineno++;
|
lineno++;
|
||||||
|
@ -1046,9 +1046,9 @@ configure_socket_backlog(char *option)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
domain_sslstart(void)
|
domain_tls_init(void)
|
||||||
{
|
{
|
||||||
kore_domain_sslstart(current_domain);
|
kore_domain_tlsinit(current_domain);
|
||||||
current_domain = NULL;
|
current_domain = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,9 @@ kore_connection_accept(struct listener *listener, struct connection **out)
|
||||||
TAILQ_INSERT_TAIL(&connections, c, list);
|
TAILQ_INSERT_TAIL(&connections, c, list);
|
||||||
|
|
||||||
#if !defined(KORE_NO_TLS)
|
#if !defined(KORE_NO_TLS)
|
||||||
c->state = CONN_STATE_SSL_SHAKE;
|
c->state = CONN_STATE_TLS_SHAKE;
|
||||||
c->write = net_write_ssl;
|
c->write = net_write_tls;
|
||||||
c->read = net_read_ssl;
|
c->read = net_read_tls;
|
||||||
#else
|
#else
|
||||||
c->state = CONN_STATE_ESTABLISHED;
|
c->state = CONN_STATE_ESTABLISHED;
|
||||||
c->write = net_write;
|
c->write = net_write;
|
||||||
|
@ -213,7 +213,7 @@ kore_connection_handle(struct connection *c)
|
||||||
|
|
||||||
switch (c->state) {
|
switch (c->state) {
|
||||||
#if !defined(KORE_NO_TLS)
|
#if !defined(KORE_NO_TLS)
|
||||||
case CONN_STATE_SSL_SHAKE:
|
case CONN_STATE_TLS_SHAKE:
|
||||||
if (c->ssl == NULL) {
|
if (c->ssl == NULL) {
|
||||||
c->ssl = SSL_new(primary_dom->ssl_ctx);
|
c->ssl = SSL_new(primary_dom->ssl_ctx);
|
||||||
if (c->ssl == NULL) {
|
if (c->ssl == NULL) {
|
||||||
|
|
|
@ -194,7 +194,7 @@ kore_domain_free(struct kore_domain *dom)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
kore_domain_sslstart(struct kore_domain *dom)
|
kore_domain_tlsinit(struct kore_domain *dom)
|
||||||
{
|
{
|
||||||
#if !defined(KORE_NO_TLS)
|
#if !defined(KORE_NO_TLS)
|
||||||
BIO *in;
|
BIO *in;
|
||||||
|
|
Loading…
Reference in New Issue