Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
ossl_ssl_session.c File Reference
`#include "ossl.h"`
Include dependency graph for ossl_ssl_session.c:

Go to the source code of this file.

## Macros
#define | GetSSLSession(obj, sess)
#define | SafeGetSSLSession(obj, sess)

## Functions
static VALUE | ossl_ssl_session_alloc (VALUE klass)
static VALUE | ossl_ssl_session_initialize (VALUE self, VALUE arg1)
int | SSL_SESSION_cmp (const SSL_SESSION *a, const SSL_SESSION *b)
static VALUE | ossl_ssl_session_eq (VALUE val1, VALUE val2)
static VALUE | ossl_ssl_session_get_time (VALUE self)
static VALUE | ossl_ssl_session_get_timeout (VALUE self)
static VALUE | ossl_ssl_session_set_time (VALUE self, VALUE time_v)
static VALUE | ossl_ssl_session_set_timeout (VALUE self, VALUE time_v)
static VALUE | ossl_ssl_session_to_der (VALUE self)
static VALUE | ossl_ssl_session_to_pem (VALUE self)
static VALUE | ossl_ssl_session_to_text (VALUE self)
void | Init_ossl_ssl_session (void)

## Variables
VALUE | cSSLSession
static VALUE | eSSLSession

## Macro Definition Documentation

#define GetSSLSession | ( |  | obj,
|  |  | sess
| ) |  |

Value:
do { \
Data_Get_Struct((obj), SSL_SESSION, (sess)); \
if (!(sess)) { \
ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:510
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
Data_Get_Struct
#define Data_Get_Struct(obj, type, sval)
ossl_raise
void ossl_raise(VALUE exc, const char *fmt,...)
Definition: ossl.c:328

Definition at line 7 of file ossl_ssl_session.c.

Referenced by ossl_ssl_session_eq(), ossl_ssl_session_get_time(), ossl_ssl_session_get_timeout(), ossl_ssl_session_set_time(), ossl_ssl_session_set_timeout(), ossl_ssl_session_to_der(), ossl_ssl_session_to_pem(), and ossl_ssl_session_to_text().

#define SafeGetSSLSession | ( |  | obj,
|  |  | sess
| ) |  |

Value:
do { \
OSSL_Check_Kind((obj), cSSLSession); \
GetSSLSession((obj), (sess)); \
} while (0)
GetSSLSession
#define GetSSLSession(obj, sess)
Definition: ossl_ssl_session.c:7
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
OSSL_Check_Kind
#define OSSL_Check_Kind(obj, klass)
Definition: ossl.h:96
cSSLSession
VALUE cSSLSession
Definition: ossl_ssl_session.c:20

Definition at line 14 of file ossl_ssl_session.c.

Referenced by ossl_ssl_session_eq().

## Function Documentation

void Init_ossl_ssl_session | ( | void |  | ) |

Definition at line 296 of file ossl_ssl_session.c.

References cSSLSession, eOSSLError, eSSLSession, mOSSL, mSSL, ossl_ssl_session_alloc(), ossl_ssl_session_eq(), ossl_ssl_session_get_time(), ossl_ssl_session_get_timeout(), ossl_ssl_session_initialize(), ossl_ssl_session_set_time(), ossl_ssl_session_set_timeout(), ossl_ssl_session_to_der(), ossl_ssl_session_to_pem(), ossl_ssl_session_to_text(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module(), rb_define_module_under(), and rb_undef_method().

Referenced by Init_ossl_ssl().

static VALUE ossl_ssl_session_alloc | ( | VALUE | klass | ) |
| static

Definition at line 23 of file ossl_ssl_session.c.

References Data_Wrap_Struct(), and NULL.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_eq | ( | VALUE | val1,
|  | VALUE | val2
| ) |  |
| static

Definition at line 90 of file ossl_ssl_session.c.

References GetSSLSession, Qfalse, Qtrue, SafeGetSSLSession, and SSL_SESSION_cmp().

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_get_time | ( | VALUE | self | ) |
| static

Definition at line 110 of file ossl_ssl_session.c.

References GetSSLSession, Qnil, rb_cTime, rb_funcall(), rb_intern, and t.

Referenced by Init_ossl_ssl_session(), and ossl_ssl_session_set_time().

static VALUE ossl_ssl_session_get_timeout | ( | VALUE | self | ) |
| static

Definition at line 132 of file ossl_ssl_session.c.

References GetSSLSession, and t.

Referenced by Init_ossl_ssl_session(), and ossl_ssl_session_set_timeout().

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

Definition at line 36 of file ossl_ssl_session.c.

References cSSLSocket, data, Data_Get_Struct, eSSLSession, in, NULL, OSSL_BIO_reset, ossl_obj2bio(), ossl_raise(), rb_eArgError, rb_obj_is_instance_of(), and RDATA.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_set_time | ( | VALUE | self,
|  | VALUE | time_v
| ) |  |
| static

Definition at line 152 of file ossl_ssl_session.c.

References GetSSLSession, NUM2LONG, ossl_ssl_session_get_time(), rb_cTime, rb_funcall(), rb_intern, rb_obj_is_instance_of(), and t.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_set_timeout | ( | VALUE | self,
|  | VALUE | time_v
| ) |  |
| static

Definition at line 173 of file ossl_ssl_session.c.

References GetSSLSession, NUM2LONG, ossl_ssl_session_get_timeout(), and t.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_to_der | ( | VALUE | self | ) |
| static

Definition at line 211 of file ossl_ssl_session.c.

References eSSLSession, GetSSLSession, len, NULL, ossl_raise(), ossl_str_adjust, p, rb_str_new(), RSTRING_PTR, and str.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_to_pem | ( | VALUE | self | ) |
| static

Definition at line 237 of file ossl_ssl_session.c.

References buf, eSSLSession, GetSSLSession, i, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_ssl_session().

static VALUE ossl_ssl_session_to_text | ( | VALUE | self | ) |
| static

Definition at line 270 of file ossl_ssl_session.c.

References buf, eSSLSession, GetSSLSession, ossl_raise(), out, rb_str_new(), and str.

Referenced by Init_ossl_ssl_session().

int SSL_SESSION_cmp | ( | const SSL_SESSION * | a,
|  | const SSL_SESSION * | b
| ) |  |

Definition at line 76 of file ossl_ssl_session.c.

References memcmp().

Referenced by ossl_ssl_session_eq().

## Variable Documentation

VALUE cSSLSession

Definition at line 20 of file ossl_ssl_session.c.

Referenced by Init_ossl_ssl_session(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), and ossl_sslctx_session_remove_cb().

VALUE eSSLSession
| static

Definition at line 21 of file ossl_ssl_session.c.

Referenced by Init_ossl_ssl_session(), ossl_ssl_session_initialize(), ossl_ssl_session_to_der(), ossl_ssl_session_to_pem(), and ossl_ssl_session_to_text().