jabberd2  2.3.1
Functions | Variables
ssl.c File Reference
#include "sx.h"
#include <openssl/x509_vfy.h>

Go to the source code of this file.

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)
 
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)
 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

int sx_openssl_initialized = 0
 

Function Documentation

static int _sx_ssl_verify_callback ( int  preverify_ok,
X509_STORE_CTX *  ctx 
)
static

this plugin implements the traditional SSL "wrappermode" streams and STARTTLS extension documented in xmpp-core

Definition at line 31 of file ssl.c.

References _sx_debug, and ZONE.

Referenced by sx_ssl_server_addcert().

static int _sx_pem_passwd_callback ( char *  buf,
int  size,
int  rwflag,
void *  password 
)
static

Definition at line 78 of file ssl.c.

Referenced by _sx_ssl_client(), and sx_ssl_server_addcert().

static void _sx_ssl_starttls_notify_proceed ( sx_t  s,
void *  arg 
)
static

Definition at line 85 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 int _sx_ssl_process ( sx_t  s,
sx_plugin_t  p,
nad_t  nad 
)
static
static void _sx_ssl_features ( sx_t  s,
sx_plugin_t  p,
nad_t  nad 
)
static
static void _sx_ssl_get_external_id ( sx_t  s,
_sx_ssl_conn_t  sc 
)
static

Definition at line 222 of file ssl.c.

References _sx_debug, SX_CONN_EXTERNAL_ID_MAX_COUNT, and ZONE.

Referenced by _sx_ssl_handshake().

static int _sx_ssl_handshake ( sx_t  s,
_sx_ssl_conn_t  sc 
)
static
static int _sx_ssl_wio ( sx_t  s,
sx_plugin_t  p,
sx_buf_t  buf 
)
static
static int _sx_ssl_rio ( sx_t  s,
sx_plugin_t  p,
sx_buf_t  buf 
)
static
static void _sx_ssl_client ( sx_t  s,
sx_plugin_t  p 
)
static
static void _sx_ssl_server ( sx_t  s,
sx_plugin_t  p 
)
static
static void _sx_ssl_free ( sx_t  s,
sx_plugin_t  p 
)
static
static void _sx_ssl_unload ( sx_plugin_t  p)
static

Definition at line 817 of file ssl.c.

References _sx_plugin_st::private, 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 
)
int sx_ssl_server_addcert ( sx_plugin_t  p,
const char *  name,
const char *  pemfile,
const char *  cachain,
int  mode,
const char *  password 
)
int sx_ssl_client_starttls ( sx_plugin_t  p,
sx_t  s,
const char *  pemfile,
const char *  private_key_password 
)

Variable Documentation

int sx_openssl_initialized = 0

Definition at line 830 of file ssl.c.

Referenced by sx_ssl_init(), and sx_ssl_server_addcert().