ossl_ssl.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Macros

#define | numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
#define | TO_SOCKET(s) (s)
#define | ossl_sslctx_set_cert(o, v) rb_iv_set((o),"@cert",(v))
#define | ossl_sslctx_set_key(o, v) rb_iv_set((o),"@key",(v))
#define | ossl_sslctx_set_client_ca(o, v) rb_iv_set((o),"@client_ca",(v))
#define | ossl_sslctx_set_ca_file(o, v) rb_iv_set((o),"@ca_file",(v))
#define | ossl_sslctx_set_ca_path(o, v) rb_iv_set((o),"@ca_path",(v))
#define | ossl_sslctx_set_timeout(o, v) rb_iv_set((o),"@timeout",(v))
#define | ossl_sslctx_set_verify_mode(o, v) rb_iv_set((o),"@verify_mode",(v))
#define | ossl_sslctx_set_verify_dep(o, v) rb_iv_set((o),"@verify_depth",(v))
#define | ossl_sslctx_set_verify_cb(o, v) rb_iv_set((o),"@verify_callback",(v))
#define | ossl_sslctx_set_options(o, v) rb_iv_set((o),"@options",(v))
#define | ossl_sslctx_set_cert_store(o, v) rb_iv_set((o),"@cert_store",(v))
#define | ossl_sslctx_set_extra_cert(o, v) rb_iv_set((o),"@extra_chain_cert",(v))
#define | ossl_sslctx_set_client_cert_cb(o, v) rb_iv_set((o),"@client_cert_cb",(v))
#define | ossl_sslctx_set_tmp_dh_cb(o, v) rb_iv_set((o),"@tmp_dh_callback",(v))
#define | ossl_sslctx_set_sess_id_ctx(o, v) rb_iv_get((o),"@session_id_context"(v))
#define | ossl_sslctx_get_cert(o) rb_iv_get((o),"@cert")
#define | ossl_sslctx_get_key(o) rb_iv_get((o),"@key")
#define | ossl_sslctx_get_client_ca(o) rb_iv_get((o),"@client_ca")
#define | ossl_sslctx_get_ca_file(o) rb_iv_get((o),"@ca_file")
#define | ossl_sslctx_get_ca_path(o) rb_iv_get((o),"@ca_path")
#define | ossl_sslctx_get_timeout(o) rb_iv_get((o),"@timeout")
#define | ossl_sslctx_get_verify_mode(o) rb_iv_get((o),"@verify_mode")
#define | ossl_sslctx_get_verify_dep(o) rb_iv_get((o),"@verify_depth")
#define | ossl_sslctx_get_verify_cb(o) rb_iv_get((o),"@verify_callback")
#define | ossl_sslctx_get_options(o) rb_iv_get((o),"@options")
#define | ossl_sslctx_get_cert_store(o) rb_iv_get((o),"@cert_store")
#define | ossl_sslctx_get_extra_cert(o) rb_iv_get((o),"@extra_chain_cert")
#define | ossl_sslctx_get_client_cert_cb(o) rb_iv_get((o),"@client_cert_cb")
#define | ossl_sslctx_get_tmp_dh_cb(o) rb_iv_get((o),"@tmp_dh_callback")
#define | ossl_sslctx_get_sess_id_ctx(o) rb_iv_get((o),"@session_id_context")
#define | ossl_ssl_get_io(o) rb_iv_get((o),"@io")
#define | ossl_ssl_get_ctx(o) rb_iv_get((o),"@context")
#define | ossl_ssl_get_sync_close(o) rb_iv_get((o),"@sync_close")
#define | ossl_ssl_get_x509(o) rb_iv_get((o),"@x509")
#define | ossl_ssl_get_key(o) rb_iv_get((o),"@key")
#define | ossl_ssl_get_tmp_dh(o) rb_iv_get((o),"@tmp_dh")
#define | ossl_ssl_set_io(o, v) rb_iv_set((o),"@io",(v))
#define | ossl_ssl_set_ctx(o, v) rb_iv_set((o),"@context",(v))
#define | ossl_ssl_set_sync_close(o, v) rb_iv_set((o),"@sync_close",(v))
#define | ossl_ssl_set_x509(o, v) rb_iv_set((o),"@x509",(v))
#define | ossl_ssl_set_key(o, v) rb_iv_set((o),"@key",(v))
#define | ossl_ssl_set_tmp_dh(o, v) rb_iv_set((o),"@tmp_dh",(v))
#define | OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
#define | ssl_get_error(ssl, ret) SSL_get_error((ssl), (ret))
#define | ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2NUM(SSL_##x))

## Functions

static void | ossl_sslctx_free (SSL_CTX *ctx)
static VALUE | ossl_sslctx_s_alloc (VALUE klass)
static VALUE | ossl_sslctx_set_ssl_version (VALUE self, VALUE ssl_method)
static VALUE | ossl_sslctx_initialize (int argc, VALUE *argv, VALUE self)
static VALUE | ossl_call_client_cert_cb (VALUE obj)
static int | ossl_client_cert_cb (SSL *ssl, X509 **x509, EVP_PKEY **pkey)
static VALUE | ossl_call_tmp_dh_callback (VALUE *args)
static DH * | ossl_tmp_dh_callback (SSL *ssl, int is_export, int keylength)
static DH * | ossl_default_tmp_dh_callback (SSL *ssl, int is_export, int keylength)
static int | ossl_ssl_verify_callback (int preverify_ok, X509_STORE_CTX *ctx)
static VALUE | ossl_call_session_get_cb (VALUE ary)
static SSL_SESSION * | ossl_sslctx_session_get_cb (SSL *ssl, unsigned char *buf, int len, int *copy)
static VALUE | ossl_call_session_new_cb (VALUE ary)
static int | ossl_sslctx_session_new_cb (SSL *ssl, SSL_SESSION *sess)
static VALUE | ossl_call_session_remove_cb (VALUE ary)
static void | ossl_sslctx_session_remove_cb (SSL_CTX *ctx, SSL_SESSION *sess)
static VALUE | ossl_sslctx_add_extra_chain_cert_i (VALUE i, VALUE arg)
static VALUE | ossl_sslctx_setup (VALUE self)
static VALUE | ossl_ssl_cipher_to_ary (SSL_CIPHER *cipher)
static VALUE | ossl_sslctx_get_ciphers (VALUE self)
static VALUE | ossl_sslctx_set_ciphers (VALUE self, VALUE v)
static VALUE | ossl_sslctx_session_add (VALUE self, VALUE arg)
static VALUE | ossl_sslctx_session_remove (VALUE self, VALUE arg)
static VALUE | ossl_sslctx_get_session_cache_mode (VALUE self)
static VALUE | ossl_sslctx_set_session_cache_mode (VALUE self, VALUE arg)
static VALUE | ossl_sslctx_get_session_cache_size (VALUE self)
static VALUE | ossl_sslctx_set_session_cache_size (VALUE self, VALUE arg)
static VALUE | ossl_sslctx_get_session_cache_stats (VALUE self)
static VALUE | ossl_sslctx_flush_sessions (int argc, VALUE *argv, VALUE self)
static void | ossl_ssl_shutdown (SSL *ssl)
static void | ossl_ssl_free (SSL *ssl)
static VALUE | ossl_ssl_s_alloc (VALUE klass)
static VALUE | ossl_ssl_initialize (int argc, VALUE *argv, VALUE self)
static VALUE | ossl_ssl_setup (VALUE self)
static void | write_would_block (int nonblock)
static void | read_would_block (int nonblock)
static VALUE | ossl_start_ssl (VALUE self, int(*func)(), const char *funcname, int nonblock)
static VALUE | ossl_ssl_connect (VALUE self)
static VALUE | ossl_ssl_connect_nonblock (VALUE self)
static VALUE | ossl_ssl_accept (VALUE self)
static VALUE | ossl_ssl_accept_nonblock (VALUE self)
static VALUE | ossl_ssl_read_internal (int argc, VALUE *argv, VALUE self, int nonblock)
static VALUE | ossl_ssl_read (int argc, VALUE *argv, VALUE self)
static VALUE | ossl_ssl_read_nonblock (int argc, VALUE *argv, VALUE self)
static VALUE | ossl_ssl_write_internal (VALUE self, VALUE str, int nonblock)
static VALUE | ossl_ssl_write (VALUE self, VALUE str)
static VALUE | ossl_ssl_write_nonblock (VALUE self, VALUE str)
static VALUE | ossl_ssl_close (VALUE self)
static VALUE | ossl_ssl_get_cert (VALUE self)
static VALUE | ossl_ssl_get_peer_cert (VALUE self)
static VALUE | ossl_ssl_get_peer_cert_chain (VALUE self)
static VALUE | ossl_ssl_get_cipher (VALUE self)
static VALUE | ossl_ssl_get_state (VALUE self)
static VALUE | ossl_ssl_pending (VALUE self)
static VALUE | ossl_ssl_session_reused (VALUE self)
static VALUE | ossl_ssl_set_session (VALUE self, VALUE arg1)
static VALUE | ossl_ssl_get_verify_result (VALUE self)
static VALUE | ossl_ssl_get_client_ca_list (VALUE self)
void | Init_ossl_ssl ()

## Variables

VALUE | mSSL
VALUE | eSSLError
VALUE | cSSLContext
VALUE | cSSLSocket
static const char * | ossl_sslctx_attrs []
static const char * | ossl_ssl_attr_readers [] = { "io", "context", }
static const char * | ossl_ssl_attrs []
ID | ID_callback_state
struct {
const char * name
SSL_METHOD *(* func )(void)
} | ossl_ssl_method_tab []
int | ossl_ssl_ex_vcb_idx
int | ossl_ssl_ex_store_p
int | ossl_ssl_ex_ptr_idx
int | ossl_ssl_ex_client_cert_cb_idx
int | ossl_ssl_ex_tmp_dh_callback_idx

## Macro Definition Documentation

#define numberof | ( |  | ary | ) | (int)(sizeof(ary)/sizeof((ary)[0]))

Definition at line 19 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_sslctx_initialize(), and ossl_sslctx_set_ssl_version().

#define ossl_ssl_def_const | ( |  | x | ) | rb_define_const(mSSL, #x, INT2NUM(SSL_##x))

Referenced by Init_ossl_ssl().

#define ossl_ssl_get_ctx | ( |  | o | ) | rb_iv_get((o),"@context")

Definition at line 76 of file ossl_ssl.c.

Referenced by ossl_ssl_setup().

#define ossl_ssl_get_io | ( |  | o | ) | rb_iv_get((o),"@io")

Definition at line 75 of file ossl_ssl.c.

Referenced by ossl_ssl_close(), ossl_ssl_read_internal(), ossl_ssl_setup(), ossl_ssl_write_internal(), and ossl_start_ssl().

#define ossl_ssl_get_key | ( |  | o | ) | rb_iv_get((o),"@key")

Definition at line 79 of file ossl_ssl.c.

Referenced by ossl_client_cert_cb().

#define ossl_ssl_get_sync_close | ( |  | o | ) | rb_iv_get((o),"@sync_close")

Definition at line 77 of file ossl_ssl.c.

Referenced by ossl_ssl_close().

#define ossl_ssl_get_tmp_dh | ( |  | o | ) | rb_iv_get((o),"@tmp_dh")

Definition at line 80 of file ossl_ssl.c.

Referenced by ossl_tmp_dh_callback().

#define ossl_ssl_get_x509 | ( |  | o | ) | rb_iv_get((o),"@x509")

Definition at line 78 of file ossl_ssl.c.

Referenced by ossl_client_cert_cb().

#define OSSL_SSL_METHOD_ENTRY | ( |  | name | ) | { #name, (SSL_METHOD *(*)(void))name##_method }

#define ossl_ssl_set_ctx | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@context",(v))

Definition at line 83 of file ossl_ssl.c.

Referenced by ossl_ssl_initialize().

#define ossl_ssl_set_io | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@io",(v))

Definition at line 82 of file ossl_ssl.c.

Referenced by ossl_ssl_initialize().

#define ossl_ssl_set_key | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@key",(v))

Definition at line 86 of file ossl_ssl.c.

Referenced by ossl_call_client_cert_cb().

#define ossl_ssl_set_sync_close | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@sync_close",(v))

Definition at line 84 of file ossl_ssl.c.

Referenced by ossl_ssl_initialize().

#define ossl_ssl_set_tmp_dh | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@tmp_dh",(v))

Definition at line 87 of file ossl_ssl.c.

Referenced by ossl_call_tmp_dh_callback().

#define ossl_ssl_set_x509 | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@x509",(v))

Definition at line 85 of file ossl_ssl.c.

Referenced by ossl_call_client_cert_cb().

#define ossl_sslctx_get_ca_file | ( |  | o | ) | rb_iv_get((o),"@ca_file")

Definition at line 51 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_ca_path | ( |  | o | ) | rb_iv_get((o),"@ca_path")

Definition at line 52 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_cert | ( |  | o | ) | rb_iv_get((o),"@cert")

Definition at line 48 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_cert_store | ( |  | o | ) | rb_iv_get((o),"@cert_store")

Definition at line 58 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_client_ca | ( |  | o | ) | rb_iv_get((o),"@client_ca")

Definition at line 50 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_client_cert_cb | ( |  | o | ) | rb_iv_get((o),"@client_cert_cb")

Definition at line 60 of file ossl_ssl.c.

Referenced by ossl_ssl_setup(), and ossl_sslctx_setup().

#define ossl_sslctx_get_extra_cert | ( |  | o | ) | rb_iv_get((o),"@extra_chain_cert")

Definition at line 59 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_key | ( |  | o | ) | rb_iv_get((o),"@key")

Definition at line 49 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_options | ( |  | o | ) | rb_iv_get((o),"@options")

Definition at line 57 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_sess_id_ctx | ( |  | o | ) | rb_iv_get((o),"@session_id_context")

Definition at line 62 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_timeout | ( |  | o | ) | rb_iv_get((o),"@timeout")

Definition at line 53 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_tmp_dh_cb | ( |  | o | ) | rb_iv_get((o),"@tmp_dh_callback")

Definition at line 61 of file ossl_ssl.c.

Referenced by ossl_ssl_setup(), and ossl_sslctx_setup().

#define ossl_sslctx_get_verify_cb | ( |  | o | ) | rb_iv_get((o),"@verify_callback")

Definition at line 56 of file ossl_ssl.c.

Referenced by ossl_ssl_setup().

#define ossl_sslctx_get_verify_dep | ( |  | o | ) | rb_iv_get((o),"@verify_depth")

Definition at line 55 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_get_verify_mode | ( |  | o | ) | rb_iv_get((o),"@verify_mode")

Definition at line 54 of file ossl_ssl.c.

Referenced by ossl_sslctx_setup().

#define ossl_sslctx_set_ca_file | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@ca_file",(v))

Definition at line 35 of file ossl_ssl.c.

#define ossl_sslctx_set_ca_path | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@ca_path",(v))

Definition at line 36 of file ossl_ssl.c.

#define ossl_sslctx_set_cert | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@cert",(v))

Definition at line 32 of file ossl_ssl.c.

#define ossl_sslctx_set_cert_store | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@cert_store",(v))

Definition at line 42 of file ossl_ssl.c.

#define ossl_sslctx_set_client_ca | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@client_ca",(v))

Definition at line 34 of file ossl_ssl.c.

#define ossl_sslctx_set_client_cert_cb | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@client_cert_cb",(v))

Definition at line 44 of file ossl_ssl.c.

#define ossl_sslctx_set_extra_cert | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@extra_chain_cert",(v))

Definition at line 43 of file ossl_ssl.c.

#define ossl_sslctx_set_key | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@key",(v))

Definition at line 33 of file ossl_ssl.c.

#define ossl_sslctx_set_options | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@options",(v))

Definition at line 41 of file ossl_ssl.c.

#define ossl_sslctx_set_sess_id_ctx | ( |  | o,
|  |  | v
| ) |  | rb_iv_get((o),"@session_id_context"(v))

Definition at line 46 of file ossl_ssl.c.

#define ossl_sslctx_set_timeout | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@timeout",(v))

Definition at line 37 of file ossl_ssl.c.

#define ossl_sslctx_set_tmp_dh_cb | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@tmp_dh_callback",(v))

Definition at line 45 of file ossl_ssl.c.

#define ossl_sslctx_set_verify_cb | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@verify_callback",(v))

Definition at line 40 of file ossl_ssl.c.

#define ossl_sslctx_set_verify_dep | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@verify_depth",(v))

Definition at line 39 of file ossl_ssl.c.

#define ossl_sslctx_set_verify_mode | ( |  | o,
|  |  | v
| ) |  | rb_iv_set((o),"@verify_mode",(v))

Definition at line 38 of file ossl_ssl.c.

#define ssl_get_error | ( |  | ssl,
|  |  | ret
| ) |  | SSL_get_error((ssl), (ret))

Definition at line 1095 of file ossl_ssl.c.

Referenced by ossl_ssl_read_internal(), ossl_ssl_write_internal(), and ossl_start_ssl().

#define TO_SOCKET | ( |  | s | ) | (s)

Definition at line 24 of file ossl_ssl.c.

Referenced by ossl_ssl_setup().

## Function Documentation

void Init_ossl_ssl | ( | void |  | ) |

Definition at line 1679 of file ossl_ssl.c.

References cSSLContext, cSSLSocket, eOSSLError, eSSLError, i, ID2SYM, ID_callback_state, Init_ossl_ssl_session(), LONG2FIX, mOSSL, mSSL, name, numberof, ossl_ssl_accept(), ossl_ssl_accept_nonblock(), ossl_ssl_attr_readers, ossl_ssl_attrs, ossl_ssl_close(), ossl_ssl_connect(), ossl_ssl_connect_nonblock(), ossl_ssl_def_const, ossl_ssl_ex_client_cert_cb_idx, ossl_ssl_ex_ptr_idx, ossl_ssl_ex_store_p, ossl_ssl_ex_tmp_dh_callback_idx, ossl_ssl_ex_vcb_idx, ossl_ssl_get_cert(), ossl_ssl_get_cipher(), ossl_ssl_get_client_ca_list(), ossl_ssl_get_peer_cert(), ossl_ssl_get_peer_cert_chain(), ossl_ssl_get_state(), ossl_ssl_get_verify_result(), ossl_ssl_initialize(), ossl_ssl_method_tab, ossl_ssl_pending(), ossl_ssl_read(), ossl_ssl_read_nonblock(), ossl_ssl_s_alloc(), ossl_ssl_session_reused(), ossl_ssl_set_session(), ossl_ssl_write(), ossl_ssl_write_nonblock(), ossl_sslctx_flush_sessions(), ossl_sslctx_get_ciphers(), ossl_sslctx_get_session_cache_mode(), ossl_sslctx_get_session_cache_size(), ossl_sslctx_get_session_cache_stats(), ossl_sslctx_initialize(), ossl_sslctx_s_alloc(), ossl_sslctx_session_add(), ossl_sslctx_session_remove(), ossl_sslctx_set_ciphers(), ossl_sslctx_set_session_cache_mode(), ossl_sslctx_set_session_cache_size(), ossl_sslctx_set_ssl_version(), ossl_sslctx_setup(), Qfalse, rb_ary_new2(), rb_ary_push(), rb_attr(), rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_private_method(), rb_intern, and rb_obj_freeze().

Referenced by Init_openssl().

static VALUE ossl_call_client_cert_cb | ( | VALUE | obj | ) |

static

Definition at line 221 of file ossl_ssl.c.

References Check_Type, Data_Get_Struct, GetPKeyPtr(), GetX509CertPtr(), NIL_P, ossl_ssl_ex_client_cert_cb_idx, ossl_ssl_set_key, ossl_ssl_set_x509, Qfalse, Qtrue, rb_ary_entry(), rb_funcall(), rb_intern, and T_ARRAY.

Referenced by ossl_client_cert_cb().

static VALUE ossl_call_session_get_cb | ( | VALUE | ary | ) |

static

Definition at line 316 of file ossl_ssl.c.

References Check_Type, NIL_P, Qnil, rb_ary_entry(), rb_funcall(), rb_intern, rb_iv_get(), and T_ARRAY.

Referenced by ossl_sslctx_session_get_cb().

static VALUE ossl_call_session_new_cb | ( | VALUE | ary | ) |

static

Definition at line 363 of file ossl_ssl.c.

References Check_Type, NIL_P, Qnil, rb_ary_entry(), rb_funcall(), rb_intern, rb_iv_get(), and T_ARRAY.

Referenced by ossl_sslctx_session_new_cb().

static VALUE ossl_call_session_remove_cb | ( | VALUE | ary | ) |

static

Definition at line 415 of file ossl_ssl.c.

References Check_Type, NIL_P, Qnil, rb_ary_entry(), rb_funcall(), rb_intern, rb_iv_get(), and T_ARRAY.

Referenced by ossl_sslctx_session_remove_cb().

static VALUE ossl_call_tmp_dh_callback | ( | VALUE * | args | ) |

static

Definition at line 256 of file ossl_ssl.c.

References Data_Get_Struct, GetPKeyPtr(), NIL_P, ossl_ssl_ex_tmp_dh_callback_idx, ossl_ssl_set_tmp_dh, Qfalse, Qtrue, rb_funcall(), and rb_intern.

Referenced by ossl_tmp_dh_callback().

static int ossl_client_cert_cb | ( | SSL * | ssl,
|  | X509 ** | x509,
|  | EVP_PKEY ** | pkey
| ) |  |

static

Definition at line 240 of file ossl_ssl.c.

References _, DupPKeyPtr(), DupX509CertPtr(), NULL, ossl_call_client_cert_cb(), ossl_ssl_ex_ptr_idx, ossl_ssl_get_key, ossl_ssl_get_x509, rb_protect(), and RTEST.

Referenced by ossl_sslctx_setup().

static DH* ossl_default_tmp_dh_callback | ( | SSL * | ssl,
|  | int | is_export,
|  | int | keylength
| ) |  |

static

Definition at line 289 of file ossl_ssl.c.

References NULL, OSSL_DEFAULT_DH_1024, OSSL_DEFAULT_DH_512, and rb_warning().

Referenced by ossl_sslctx_setup().

static VALUE ossl_ssl_accept | ( | VALUE | self | ) |

static

Definition at line 1207 of file ossl_ssl.c.

References ossl_ssl_setup(), and ossl_start_ssl().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_accept_nonblock | ( | VALUE | self | ) |

static

Definition at line 1232 of file ossl_ssl.c.

References ossl_ssl_setup(), and ossl_start_ssl().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_cipher_to_ary | ( | SSL_CIPHER * | cipher | ) |

static

Definition at line 687 of file ossl_ssl.c.

References INT2FIX, rb_ary_new2(), rb_ary_push(), and rb_str_new2().

Referenced by ossl_ssl_get_cipher(), and ossl_sslctx_get_ciphers().

static VALUE ossl_ssl_close | ( | VALUE | self | ) |

static

Definition at line 1403 of file ossl_ssl.c.

References Data_Get_Struct, ossl_ssl_get_io, ossl_ssl_get_sync_close, ossl_ssl_shutdown(), Qnil, rb_funcall(), rb_intern, and RTEST.

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_connect | ( | VALUE | self | ) |

static

Definition at line 1168 of file ossl_ssl.c.

References ossl_ssl_setup(), and ossl_start_ssl().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_connect_nonblock | ( | VALUE | self | ) |

static

Definition at line 1193 of file ossl_ssl.c.

References ossl_ssl_setup(), and ossl_start_ssl().

Referenced by Init_ossl_ssl().

static void ossl_ssl_free | ( | SSL * | ssl | ) |

static

Definition at line 996 of file ossl_ssl.c.

References ossl_ssl_shutdown().

Referenced by ossl_ssl_s_alloc().

static VALUE ossl_ssl_get_cert | ( | VALUE | self | ) |

static

Definition at line 1422 of file ossl_ssl.c.

References Data_Get_Struct, NULL, ossl_x509_new(), Qnil, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_cipher | ( | VALUE | self | ) |

static

Definition at line 1515 of file ossl_ssl.c.

References Data_Get_Struct, ossl_ssl_cipher_to_ary(), Qnil, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_client_ca_list | ( | VALUE | self | ) |

static

Definition at line 1663 of file ossl_ssl.c.

References Data_Get_Struct, ossl_x509name_sk2ary(), Qnil, rb_warning(), and STACK_OF().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_peer_cert | ( | VALUE | self | ) |

static

Definition at line 1452 of file ossl_ssl.c.

References Data_Get_Struct, NULL, ossl_x509_new(), Qnil, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_peer_cert_chain | ( | VALUE | self | ) |

static

Definition at line 1483 of file ossl_ssl.c.

References Data_Get_Struct, i, ossl_x509_new(), Qnil, rb_ary_new2(), rb_ary_push(), rb_warning(), and STACK_OF().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_state | ( | VALUE | self | ) |

static

Definition at line 1537 of file ossl_ssl.c.

References Data_Get_Struct, Qnil, rb_str_cat2(), rb_str_new2(), rb_warning(), and ruby_verbose.

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_get_verify_result | ( | VALUE | self | ) |

static

Definition at line 1638 of file ossl_ssl.c.

References Data_Get_Struct, INT2FIX, Qnil, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 1025 of file ossl_ssl.c.

References Check_Type, cSSLContext, OSSL_Check_Kind, ossl_ssl_set_ctx, ossl_ssl_set_io, ossl_ssl_set_sync_close, ossl_sslctx_setup(), Qfalse, Qnil, rb_call_super(), rb_funcall(), rb_intern, rb_iv_set(), rb_scan_args(), and T_FILE.

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_pending | ( | VALUE | self | ) |

static

Definition at line 1562 of file ossl_ssl.c.

References Data_Get_Struct, INT2NUM(), Qnil, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_read | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 1307 of file ossl_ssl.c.

References ossl_ssl_read_internal().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_read_internal | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self,
|  | int | nonblock
| ) |  |

static

Definition at line 1239 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, FPTR_TO_FD, GetOpenFile, len, NIL_P, NUM2INT, OBJ_TAINT, ossl_raise(), ossl_ssl_get_io, rb_eof_error(), rb_funcall(), rb_intern, rb_io_wait_readable(), rb_io_wait_writable(), rb_scan_args(), rb_str_modify(), rb_str_new(), rb_str_resize(), rb_str_set_len, rb_sys_fail(), rb_thread_wait_fd(), rb_warning(), read_would_block(), RSTRING_LENINT, RSTRING_PTR, ssl_get_error, StringValue, and write_would_block().

Referenced by ossl_ssl_read(), and ossl_ssl_read_nonblock().

static VALUE ossl_ssl_read_nonblock | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 1324 of file ossl_ssl.c.

References ossl_ssl_read_internal().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_s_alloc | ( | VALUE | klass | ) |

static

Definition at line 1003 of file ossl_ssl.c.

References Data_Wrap_Struct, NULL, and ossl_ssl_free().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_session_reused | ( | VALUE | self | ) |

static

Definition at line 1582 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, ossl_raise(), Qfalse, Qnil, Qtrue, and rb_warning().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_set_session | ( | VALUE | self,
|  | VALUE | arg1
| ) |  |

static

Definition at line 1606 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, ossl_raise(), ossl_ssl_setup(), Qnil, rb_warning(), and SafeGetSSLSession.

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_setup | ( | VALUE | self | ) |

static

Definition at line 1047 of file ossl_ssl.c.

References Data_Get_Struct, DATA_PTR, eSSLError, FPTR_TO_FD, GetOpenFile, NIL_P, ossl_raise(), ossl_ssl_ex_client_cert_cb_idx, ossl_ssl_ex_ptr_idx, ossl_ssl_ex_tmp_dh_callback_idx, ossl_ssl_ex_vcb_idx, ossl_ssl_get_ctx, ossl_ssl_get_io, ossl_sslctx_get_client_cert_cb, ossl_sslctx_get_tmp_dh_cb, ossl_sslctx_get_verify_cb, Qtrue, rb_io_check_readable(), rb_io_check_writable(), rb_iv_get(), StringValuePtr, and TO_SOCKET.

Referenced by ossl_ssl_accept(), ossl_ssl_accept_nonblock(), ossl_ssl_connect(), ossl_ssl_connect_nonblock(), and ossl_ssl_set_session().

static void ossl_ssl_shutdown | ( | SSL * | ssl | ) |

static

Definition at line 975 of file ossl_ssl.c.

References i.

Referenced by ossl_ssl_close(), and ossl_ssl_free().

static int ossl_ssl_verify_callback | ( | int | preverify_ok,
|  | X509_STORE_CTX * | ctx
| ) |  |

static

Definition at line 304 of file ossl_ssl.c.

References ossl_ssl_ex_vcb_idx, ossl_verify_cb(), and ossl_verify_cb_idx.

Referenced by ossl_sslctx_setup().

static VALUE ossl_ssl_write | ( | VALUE | self,
|  | VALUE | str
| ) |  |

static

Definition at line 1378 of file ossl_ssl.c.

References ossl_ssl_write_internal().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_write_internal | ( | VALUE | self,
|  | VALUE | str,
|  | int | nonblock
| ) |  |

static

Definition at line 1330 of file ossl_ssl.c.

References Data_Get_Struct, errno, eSSLError, FPTR_TO_FD, GetOpenFile, INT2NUM(), ossl_raise(), ossl_ssl_get_io, rb_funcall(), rb_intern, rb_io_wait_readable(), rb_io_wait_writable(), rb_sys_fail(), rb_warning(), read_would_block(), RSTRING_LENINT, RSTRING_PTR, ssl_get_error, StringValue, and write_would_block().

Referenced by ossl_ssl_write(), and ossl_ssl_write_nonblock().

static VALUE ossl_ssl_write_nonblock | ( | VALUE | self,
|  | VALUE | str
| ) |  |

static

Definition at line 1391 of file ossl_ssl.c.

References ossl_ssl_write_internal().

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_add_extra_chain_cert_i | ( | VALUE | i,
|  | VALUE | arg
| ) |  |

static

Definition at line 459 of file ossl_ssl.c.

References Data_Get_Struct, DupX509CertPtr(), eSSLError, i, NULL, and ossl_raise().

Referenced by ossl_sslctx_setup().

static VALUE ossl_sslctx_flush_sessions | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 948 of file ossl_ssl.c.

References Data_Get_Struct, NIL_P, NUM2LONG(), ossl_raise(), rb_cTime, rb_eArgError, rb_funcall(), rb_intern, rb_obj_is_instance_of(), rb_scan_args(), and time_t.

Referenced by Init_ossl_ssl().

static void ossl_sslctx_free | ( | SSL_CTX * | ctx | ) |

static

Definition at line 132 of file ossl_ssl.c.

References NULL, and ossl_ssl_ex_store_p.

Referenced by ossl_sslctx_s_alloc().

static VALUE ossl_sslctx_get_ciphers | ( | VALUE | self | ) |

static

Definition at line 709 of file ossl_ssl.c.

References Data_Get_Struct, i, ossl_ssl_cipher_to_ary(), Qnil, rb_ary_new(), rb_ary_new2(), rb_ary_push(), rb_warning(), and STACK_OF().

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_get_session_cache_mode | ( | VALUE | self | ) |

static

Definition at line 828 of file ossl_ssl.c.

References Data_Get_Struct, and LONG2NUM.

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_get_session_cache_size | ( | VALUE | self | ) |

static

Definition at line 865 of file ossl_ssl.c.

References Data_Get_Struct, and LONG2NUM.

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_get_session_cache_stats | ( | VALUE | self | ) |

static

Definition at line 916 of file ossl_ssl.c.

References Data_Get_Struct, hash(), ID2SYM, LONG2NUM, rb_hash_aset(), rb_hash_new(), and rb_intern.

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 202 of file ossl_ssl.c.

References buf, i, numberof, ossl_sslctx_attrs, ossl_sslctx_set_ssl_version(), Qnil, rb_iv_set(), rb_scan_args(), and snprintf.

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_s_alloc | ( | VALUE | klass | ) |

static

Definition at line 140 of file ossl_ssl.c.

References Data_Wrap_Struct, eSSLError, ossl_raise(), and ossl_sslctx_free().

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_session_add | ( | VALUE | self,
|  | VALUE | arg
| ) |  |

static

Definition at line 792 of file ossl_ssl.c.

References Data_Get_Struct, Qfalse, Qtrue, and SafeGetSSLSession.

Referenced by Init_ossl_ssl().

static SSL_SESSION* ossl_sslctx_session_get_cb | ( | SSL * | ssl,
|  | unsigned char * | buf,
|  | int | len,
|  | int * | copy
| ) |  |

static

Definition at line 333 of file ossl_ssl.c.

References _, cSSLSession, ID_callback_state, INT2NUM(), NULL, ossl_call_session_get_cb(), OSSL_Debug, ossl_ssl_ex_ptr_idx, rb_ary_new2(), rb_ary_push(), rb_ivar_set(), rb_obj_is_instance_of(), rb_protect(), rb_str_new(), and SafeGetSSLSession.

Referenced by ossl_sslctx_setup().

static int ossl_sslctx_session_new_cb | ( | SSL * | ssl,
|  | SSL_SESSION * | sess
| ) |  |

static

Definition at line 380 of file ossl_ssl.c.

References _, cSSLSession, DATA_PTR, ID_callback_state, INT2NUM(), NULL, ossl_call_session_new_cb(), OSSL_Debug, ossl_ssl_ex_ptr_idx, rb_ary_new2(), rb_ary_push(), rb_ivar_set(), rb_obj_alloc(), and rb_protect().

Referenced by ossl_sslctx_setup().

static VALUE ossl_sslctx_session_remove | ( | VALUE | self,
|  | VALUE | arg
| ) |  |

static

Definition at line 810 of file ossl_ssl.c.

References Data_Get_Struct, Qfalse, Qtrue, and SafeGetSSLSession.

Referenced by Init_ossl_ssl().

static void ossl_sslctx_session_remove_cb | ( | SSL_CTX * | ctx,
|  | SSL_SESSION * | sess
| ) |  |

static

Definition at line 429 of file ossl_ssl.c.

References _, cSSLSession, DATA_PTR, NULL, ossl_call_session_remove_cb(), OSSL_Debug, ossl_ssl_ex_ptr_idx, rb_ary_new2(), rb_ary_push(), rb_obj_alloc(), and rb_protect().

Referenced by ossl_sslctx_setup().

static VALUE ossl_sslctx_set_ciphers | ( | VALUE | self,
|  | VALUE | v
| ) |  |

static

Definition at line 749 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, i, NIL_P, ossl_raise(), Qnil, RARRAY_LEN, rb_ary_entry(), rb_check_frozen, rb_str_append(), rb_str_cat2(), rb_str_new(), rb_String(), RSTRING_PTR, StringValue, T_ARRAY, TYPE, and v.

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_set_session_cache_mode | ( | VALUE | self,
|  | VALUE | arg
| ) |  |

static

Definition at line 846 of file ossl_ssl.c.

References arg, Data_Get_Struct, and NUM2LONG().

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_set_session_cache_size | ( | VALUE | self,
|  | VALUE | arg
| ) |  |

static

Definition at line 882 of file ossl_ssl.c.

References arg, Data_Get_Struct, and NUM2LONG().

Referenced by Init_ossl_ssl().

static VALUE ossl_sslctx_set_ssl_version | ( | VALUE | self,
|  | VALUE | ssl_method
| ) |  |

static

Definition at line 165 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, i, name, NULL, numberof, ossl_raise(), ossl_ssl_method_tab, rb_eArgError, rb_id2name(), StringValuePtr, SYM2ID, T_SYMBOL, and TYPE.

Referenced by Init_ossl_ssl(), and ossl_sslctx_initialize().

static VALUE ossl_sslctx_setup | ( | VALUE | self | ) |

static

Definition at line 543 of file ossl_ssl.c.

References Data_Get_Struct, eSSLError, GetPKeyPtr(), GetX509CertPtr(), GetX509StorePtr(), i, NIL_P, NULL, NUM2INT, NUM2LONG(), OBJ_FROZEN, ossl_client_cert_cb(), OSSL_Debug, ossl_default_tmp_dh_callback(), ossl_raise(), ossl_ssl_ex_ptr_idx, ossl_ssl_ex_store_p, ossl_ssl_verify_callback(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_get_ca_file, ossl_sslctx_get_ca_path, ossl_sslctx_get_cert, ossl_sslctx_get_cert_store, ossl_sslctx_get_client_ca, ossl_sslctx_get_client_cert_cb, ossl_sslctx_get_extra_cert, ossl_sslctx_get_key, ossl_sslctx_get_options, ossl_sslctx_get_sess_id_ctx, ossl_sslctx_get_timeout, ossl_sslctx_get_tmp_dh_cb, ossl_sslctx_get_verify_dep, ossl_sslctx_get_verify_mode, ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), ossl_tmp_dh_callback(), Qnil, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_block_call, rb_intern, rb_iv_get(), rb_obj_freeze(), rb_warning(), RSTRING_LENINT, RSTRING_PTR, RTEST, StringValue, StringValuePtr, T_ARRAY, and TYPE.

Referenced by Init_ossl_ssl(), and ossl_ssl_initialize().

static VALUE ossl_start_ssl | ( | VALUE | self,
|  | int(*)() | func,
|  | const char * | funcname,
|  | int | nonblock
| ) |  |

static

Definition at line 1119 of file ossl_ssl.c.

References Data_Get_Struct, errno, eSSLError, FPTR_TO_FD, func, GetOpenFile, ID_callback_state, NIL_P, NUM2INT, ossl_raise(), ossl_ssl_get_io, Qnil, rb_io_wait_readable(), rb_io_wait_writable(), rb_ivar_get(), rb_ivar_set(), rb_jump_tag(), rb_sys_fail(), read_would_block(), ssl_get_error, and write_would_block().

Referenced by ossl_ssl_accept(), ossl_ssl_accept_nonblock(), ossl_ssl_connect(), and ossl_ssl_connect_nonblock().

static DH* ossl_tmp_dh_callback | ( | SSL * | ssl,
|  | int | is_export,
|  | int | keylength
| ) |  |

static

Definition at line 274 of file ossl_ssl.c.

References _, args, GetPKeyPtr(), INT2FIX, NULL, ossl_call_tmp_dh_callback(), ossl_ssl_ex_ptr_idx, ossl_ssl_get_tmp_dh, rb_protect(), and RTEST.

Referenced by ossl_sslctx_setup().

static void read_would_block | ( | int | nonblock | ) |

static

Definition at line 1109 of file ossl_ssl.c.

References eSSLError, ossl_exc_new(), rb_exc_raise(), rb_extend_object(), and rb_mWaitReadable.

Referenced by ossl_ssl_read_internal(), ossl_ssl_write_internal(), and ossl_start_ssl().

static void write_would_block | ( | int | nonblock | ) |

static

Definition at line 1099 of file ossl_ssl.c.

References eSSLError, ossl_exc_new(), rb_exc_raise(), rb_extend_object(), and rb_mWaitWritable.

Referenced by ossl_ssl_read_internal(), ossl_ssl_write_internal(), and ossl_start_ssl().

## Variable Documentation

VALUE cSSLContext

Definition at line 29 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), and ossl_ssl_initialize().

VALUE cSSLSocket

Definition at line 30 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), and ossl_ssl_session_initialize().

VALUE eSSLError

Definition at line 28 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_ssl_read_internal(), ossl_ssl_session_reused(), ossl_ssl_set_session(), ossl_ssl_setup(), ossl_ssl_write_internal(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_s_alloc(), ossl_sslctx_set_ciphers(), ossl_sslctx_set_ssl_version(), ossl_sslctx_setup(), ossl_start_ssl(), read_would_block(), and write_would_block().

SSL_METHOD*(* func)(void)

Definition at line 104 of file ossl_ssl.c.

Referenced by alloc_event_hook(), call_cfunc(), check_cfunc(), class_instance_method_list(), default_handler(), define_filetest_function(), dlhandle_sym(), do_checksum(), enum_count(), enum_find_index(), exec_recursive(), extract_fd(), f_addsub(), f_divide(), f_format(), f_round_common(), get_freefunc(), obj_ivar_each(), onig_foreach_name(), ossl_start_ssl(), parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), rb_add_method_cfunc(), rb_catch(), rb_define_alloc_func(), rb_define_global_function(), rb_define_method(), rb_define_method_id(), rb_define_module_function(), rb_define_private_method(), rb_define_protected_method(), rb_define_singleton_method(), rb_dlcfunc2ptr(), rb_dlcfunc_new(), rb_dlptr_new2(), rb_exec_recursive(), rb_exec_recursive_outer(), rb_exec_recursive_paired(), rb_fiber_new(), rb_get_values_at(), rb_glob(), rb_glob2(), rb_hash_foreach(), rb_hash_update_by(), rb_ivar_foreach(), rb_mutex_synchronize(), rb_proc_new(), rb_set_end_proc(), rb_stat_inspect(), rb_thread_blocking_region(), rb_thread_io_blocking_region(), rb_w32_asynchronize(), rsock_bsock_send(), rsock_connect(), ruby_brace_glob0(), ruby_suppress_tracing(), ruby_vm_at_exit(), ruby_vm_run_at_exit_hooks(), set_unblock_function(), st_foreach_safe(), tk_funcall(), trap(), trap_handler(), ttymode(), and zstream_init().

ID ID_callback_state

Definition at line 97 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), and ossl_start_ssl().

VALUE mSSL

Definition at line 27 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), and Init_ossl_ssl_session().

const char* name

Definition at line 103 of file ossl_ssl.c.

const char* ossl_ssl_attr_readers[] = { "io", "context", }

static

Definition at line 89 of file ossl_ssl.c.

Referenced by Init_ossl_ssl().

const char* ossl_ssl_attrs[]

static

Initial value:
= {
"sync_close",
}

Definition at line 90 of file ossl_ssl.c.

Referenced by Init_ossl_ssl().

int ossl_ssl_ex_client_cert_cb_idx

Definition at line 128 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_call_client_cert_cb(), and ossl_ssl_setup().

int ossl_ssl_ex_ptr_idx

Definition at line 127 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_client_cert_cb(), ossl_ssl_setup(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), ossl_sslctx_setup(), and ossl_tmp_dh_callback().

int ossl_ssl_ex_store_p

Definition at line 126 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_sslctx_free(), and ossl_sslctx_setup().

int ossl_ssl_ex_tmp_dh_callback_idx

Definition at line 129 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_call_tmp_dh_callback(), and ossl_ssl_setup().

int ossl_ssl_ex_vcb_idx

Definition at line 125 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), ossl_ssl_setup(), and ossl_ssl_verify_callback().

struct { ... } ossl_ssl_method_tab[]

Initial value:
= {
#define OSSL_SSL_METHOD_ENTRY(name)
OSSL_SSL_METHOD_ENTRY(TLSv1),
OSSL_SSL_METHOD_ENTRY(TLSv1_server),
OSSL_SSL_METHOD_ENTRY(TLSv1_client),
OSSL_SSL_METHOD_ENTRY(SSLv3),
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
OSSL_SSL_METHOD_ENTRY(SSLv23),
OSSL_SSL_METHOD_ENTRY(SSLv23_server),
OSSL_SSL_METHOD_ENTRY(SSLv23_client),
}

Referenced by Init_ossl_ssl(), and ossl_sslctx_set_ssl_version().

const char* ossl_sslctx_attrs[]

static

Initial value:
= {
"cert", "key", "client_ca", "ca_file", "ca_path",
"timeout", "verify_mode", "verify_depth",
"verify_callback", "options", "cert_store", "extra_chain_cert",
"client_cert_cb", "tmp_dh_callback", "session_id_context",
"session_get_cb", "session_new_cb", "session_remove_cb",
}

Definition at line 64 of file ossl_ssl.c.

Referenced by ossl_sslctx_initialize().