jabberd2
2.7.0
|
Go to the source code of this file.
Macros | |
#define | DECLARE_sx_ssl_getparams(name, type) |
Functions | |
static int | _sx_ssl_verify_callback (int preverify_ok, X509_STORE_CTX *ctx) |
this plugin implements the traditional SSL "wrappermode" streams and STARTTLS extension documented in xmpp-core More... | |
static int | _sx_pem_passwd_callback (char *buf, int size, int rwflag, void *password) |
DECLARE_sx_ssl_getparams (DHparams, DH) | |
static DH * | sx_ssl_make_dh_params (BIGNUM *(*const get_prime)(BIGNUM *), const char *gen) |
static void | sx_ssl_free_dh_params (void) |
static DH * | _sx_ssl_tmp_dh_callback (SSL *ssl, int export, int keylen) |
static void | _sx_ssl_starttls_notify_proceed (sx_t s, void *arg) |
static int | _sx_ssl_process (sx_t s, sx_plugin_t p, nad_t nad) |
static void | _sx_ssl_features (sx_t s, sx_plugin_t p, nad_t nad) |
static void | _sx_ssl_get_external_id (sx_t s, _sx_ssl_conn_t sc) |
static int | _sx_ssl_handshake (sx_t s, _sx_ssl_conn_t sc) |
static int | _sx_ssl_wio (sx_t s, sx_plugin_t p, sx_buf_t buf) |
static int | _sx_ssl_rio (sx_t s, sx_plugin_t p, sx_buf_t buf) |
static void | _sx_ssl_client (sx_t s, sx_plugin_t p) |
static void | _sx_ssl_server (sx_t s, sx_plugin_t p) |
static void | _sx_ssl_free (sx_t s, sx_plugin_t p) |
cleanup More... | |
static void | _sx_ssl_unload (sx_plugin_t p) |
int | sx_ssl_init (sx_env_t env, sx_plugin_t p, va_list args) |
args: name, pemfile, cachain, mode More... | |
int | sx_ssl_server_addcert (sx_plugin_t p, const char *name, const char *pemfile, const char *cachain, int mode, const char *password, const char *ciphers) |
args: name, pemfile, cachain, mode More... | |
int | sx_ssl_client_starttls (sx_plugin_t p, sx_t s, const char *pemfile, const char *private_key_password) |
Variables | |
dhparams [] | |
int | sx_openssl_initialized = 0 |
#define DECLARE_sx_ssl_getparams | ( | name, | |
type | |||
) |
|
static |
this plugin implements the traditional SSL "wrappermode" streams and STARTTLS extension documented in xmpp-core
Definition at line 33 of file ssl.c.
References _sx_debug, and ZONE.
Referenced by sx_ssl_server_addcert().
|
static |
Definition at line 80 of file ssl.c.
Referenced by _sx_ssl_client(), and sx_ssl_server_addcert().
|
static |
Definition at line 113 of file ssl.c.
Referenced by _sx_ssl_tmp_dh_callback().
|
static |
|
static |
Definition at line 150 of file ssl.c.
References dhparams, and sx_ssl_make_dh_params().
Referenced by sx_ssl_server_addcert().
|
static |
Definition at line 169 of file ssl.c.
References _sx_debug, _sx_reset(), _sx_st::flags, _sx_st::req_to, sx_server_init(), SX_SSL_WRAPPER, and ZONE.
Referenced by _sx_ssl_process().
|
static |
Definition at line 188 of file ssl.c.
References _sx_buffer_new(), _sx_debug, _sx_event, _sx_gen_error, _sx_reset(), _sx_ssl_starttls_notify_proceed(), event_ERROR, _sx_st::flags, _sx_plugin_st::index, jqueue_push(), NAD_ENAME, NAD_ENAME_L, NAD_ENS, nad_free(), NAD_NURI, NAD_NURI_L, _sx_st::ns, _sx_st::plugin_data, _sx_st::req_from, _sx_st::req_to, _sx_st::req_version, _sx_st::ssf, sx_client_init(), SX_COMPRESS_WRAPPER, SX_ERR_STARTTLS_FAILURE, SX_SSL_STARTTLS_OFFER, SX_SSL_WRAPPER, _sx_st::type, type_CLIENT, type_SERVER, uri_TLS, _sx_st::want_write, _sx_st::wbufq, and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 288 of file ssl.c.
References _sx_debug, _sx_st::flags, nad_add_namespace(), nad_append_elem(), _sx_st::ssf, _sx_st::state, state_STREAM, SX_COMPRESS_WRAPPER, SX_SSL_STARTTLS_OFFER, SX_SSL_STARTTLS_REQUIRE, uri_TLS, and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 306 of file ssl.c.
References _sx_debug, SX_CONN_EXTERNAL_ID_MAX_COUNT, and ZONE.
Referenced by _sx_ssl_handshake().
|
static |
Definition at line 418 of file ssl.c.
References _sx_debug, _sx_event, _sx_gen_error, _sx_ssl_get_external_id(), event_ERROR, _sx_st::flags, _sx_st::ssf, _sx_st::state, state_STREAM, stream_err_UNDEFINED_CONDITION, sx_close(), SX_ERR_SSL, sx_error(), SX_SSL_WRAPPER, _sx_st::type, type_CLIENT, and ZONE.
Referenced by _sx_ssl_rio(), and _sx_ssl_wio().
|
static |
Definition at line 485 of file ssl.c.
References _sx_buffer_alloc_margin(), _sx_buffer_clear(), _sx_buffer_free(), _sx_buffer_new(), _sx_close(), _sx_debug, _sx_event, _sx_gen_error, _sx_ssl_handshake(), _sx_buf_st::data, event_ERROR, _sx_st::flags, _sx_plugin_st::index, jqueue_pull(), jqueue_push(), jqueue_size(), _sx_buf_st::len, _sx_buf_st::notify, _sx_buf_st::notify_arg, _sx_st::plugin_data, _sx_st::state, state_STREAM, stream_err_UNDEFINED_CONDITION, sx_close(), SX_ERR_SSL, sx_error(), SX_SSL_WRAPPER, _sx_st::want_read, and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 590 of file ssl.c.
References _sx_buffer_alloc_margin(), _sx_buffer_clear(), _sx_close(), _sx_debug, _sx_event, _sx_gen_error, _sx_ssl_handshake(), _sx_buf_st::data, event_ERROR, _sx_st::flags, _sx_plugin_st::index, jqueue_size(), _sx_buf_st::len, _sx_st::plugin_data, _sx_st::state, state_STREAM, stream_err_UNDEFINED_CONDITION, sx_close(), SX_ERR_SSL, sx_error(), SX_SSL_WRAPPER, _sx_st::want_read, _sx_st::want_write, and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 716 of file ssl.c.
References _sx_chain_io_plugin(), _sx_debug, _sx_pem_passwd_callback(), _sx_st::flags, _sx_plugin_st::index, jqueue_new(), _sx_st::plugin_data, _sx_plugin_st::private, _sx_st::req_from, _sx_st::ssf, SSL_OP_NO_TICKET, SX_CONN_EXTERNAL_ID_MAX_COUNT, SX_SSL_WRAPPER, _sx_st::tag, xhash_get(), and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 824 of file ssl.c.
References _sx_chain_io_plugin(), _sx_debug, _sx_st::flags, _sx_plugin_st::index, jqueue_new(), _sx_st::plugin_data, _sx_plugin_st::private, _sx_st::req_to, _sx_st::ssf, SX_CONN_EXTERNAL_ID_MAX_COUNT, SX_SSL_WRAPPER, _sx_st::tag, xhash_get(), and ZONE.
Referenced by sx_ssl_init().
|
static |
cleanup
Definition at line 871 of file ssl.c.
References _sx_buffer_free(), _sx_plugin_st::index, jqueue_free(), jqueue_pull(), log_debug, _sx_st::plugin_data, SX_CONN_EXTERNAL_ID_MAX_COUNT, _sx_st::type, type_NONE, and ZONE.
Referenced by sx_ssl_init().
|
static |
Definition at line 910 of file ssl.c.
References _sx_plugin_st::private, sx_ssl_free_dh_params(), xhash_free(), xhash_iter_first(), xhash_iter_get(), and xhash_iter_next().
Referenced by sx_ssl_init().
int sx_ssl_init | ( | sx_env_t | env, |
sx_plugin_t | p, | ||
va_list | args | ||
) |
args: name, pemfile, cachain, mode
Definition at line 928 of file ssl.c.
References _sx_debug, _sx_ssl_client(), _sx_ssl_features(), _sx_ssl_free(), _sx_ssl_process(), _sx_ssl_rio(), _sx_ssl_server(), _sx_ssl_unload(), _sx_ssl_wio(), _sx_plugin_st::client, _sx_plugin_st::features, _sx_plugin_st::free, _sx_plugin_st::magic, _sx_plugin_st::private, _sx_plugin_st::process, _sx_plugin_st::rio, _sx_plugin_st::server, sx_openssl_initialized, SX_SSL_MAGIC, sx_ssl_server_addcert(), _sx_plugin_st::unload, _sx_plugin_st::wio, and ZONE.
Referenced by _c2s_hosts_expand(), _s2s_hosts_expand(), and JABBER_MAIN().
int sx_ssl_server_addcert | ( | sx_plugin_t | p, |
const char * | name, | ||
const char * | pemfile, | ||
const char * | cachain, | ||
int | mode, | ||
const char * | password, | ||
const char * | ciphers | ||
) |
args: name, pemfile, cachain, mode
Definition at line 977 of file ssl.c.
References _sx_debug, _sx_pem_passwd_callback(), _sx_ssl_tmp_dh_callback(), _sx_ssl_verify_callback(), dhparams, _sx_plugin_st::private, sx_openssl_initialized, xhash_free(), xhash_get(), xhash_new(), xhash_put(), and ZONE.
Referenced by _c2s_hosts_expand(), _s2s_hosts_expand(), and sx_ssl_init().
int sx_ssl_client_starttls | ( | sx_plugin_t | p, |
sx_t | s, | ||
const char * | pemfile, | ||
const char * | private_key_password | ||
) |
Definition at line 1148 of file ssl.c.
References _sx_buffer_new(), _sx_debug, _sx_event, event_WANT_WRITE, _sx_st::flags, _sx_plugin_st::index, jqueue_push(), _sx_st::plugin_data, _sx_st::ssf, _sx_st::state, state_STREAM, SX_COMPRESS_WRAPPER, _sx_st::type, type_CLIENT, uri_TLS, _sx_st::want_write, _sx_st::wbufq, and ZONE.
Referenced by _out_sx_callback(), c2s_router_sx_callback(), s2s_router_sx_callback(), and sm_sx_callback().
dhparams[] |
Definition at line 104 of file ssl.c.
Referenced by _sx_ssl_tmp_dh_callback(), sx_ssl_free_dh_params(), and sx_ssl_server_addcert().
int sx_openssl_initialized = 0 |
Definition at line 925 of file ssl.c.
Referenced by sx_ssl_init(), and sx_ssl_server_addcert().