ext/openssl/ossl_engine.c File Reference

#include "ossl.h"

Go to the source code of this file.

Defines

#define WrapEngine(klass, obj, engine)
#define GetEngine(obj, engine)
#define SafeGetEngine(obj, engine)
#define OSSL_ENGINE_LOAD_IF_MATCH(x)
#define DefEngineConst(x)   rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))

Functions

static VALUE ossl_engine_s_load (int argc, VALUE *argv, VALUE klass)
static VALUE ossl_engine_s_cleanup (VALUE self)
static VALUE ossl_engine_s_engines (VALUE klass)
static VALUE ossl_engine_s_by_id (VALUE klass, VALUE id)
static VALUE ossl_engine_s_alloc (VALUE klass)
static VALUE ossl_engine_get_id (VALUE self)
static VALUE ossl_engine_get_name (VALUE self)
static VALUE ossl_engine_finish (VALUE self)
static VALUE ossl_engine_get_cipher (VALUE self, VALUE name)
static VALUE ossl_engine_get_digest (VALUE self, VALUE name)
static VALUE ossl_engine_load_privkey (int argc, VALUE *argv, VALUE self)
static VALUE ossl_engine_load_pubkey (int argc, VALUE *argv, VALUE self)
static VALUE ossl_engine_set_default (VALUE self, VALUE flag)
static VALUE ossl_engine_ctrl_cmd (int argc, VALUE *argv, VALUE self)
static VALUE ossl_engine_cmd_flag_to_name (int flag)
static VALUE ossl_engine_get_cmds (VALUE self)
static VALUE ossl_engine_inspect (VALUE self)
void Init_ossl_engine ()

Variables

VALUE cEngine
VALUE eEngineError

Define Documentation

#define DefEngineConst (  )     rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))

Definition at line 364 of file ossl_engine.c.

Referenced by Init_ossl_engine().

#define GetEngine ( obj,
engine   ) 
#define OSSL_ENGINE_LOAD_IF_MATCH (  ) 
Value:
do{\
  if(!strcmp(#x, RSTRING_PTR(name))){\
    ENGINE_load_##x();\
    return Qtrue;\
  }\
}while(0)

Definition at line 41 of file ossl_engine.c.

Referenced by ossl_engine_s_load().

#define SafeGetEngine ( obj,
engine   ) 
Value:
do { \
    OSSL_Check_Kind((obj), cEngine); \
    GetPKCS7((obj), (engine)); \
} while (0)

Definition at line 27 of file ossl_engine.c.

#define WrapEngine ( klass,
obj,
engine   ) 
Value:
do { \
    if (!(engine)) { \
        ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
    } \
    (obj) = Data_Wrap_Struct((klass), 0, ENGINE_free, (engine)); \
} while(0)

Definition at line 15 of file ossl_engine.c.

Referenced by ossl_engine_s_alloc(), ossl_engine_s_by_id(), and ossl_engine_s_engines().


Function Documentation

void Init_ossl_engine ( void   ) 
static VALUE ossl_engine_cmd_flag_to_name ( int  flag  )  [static]

Definition at line 314 of file ossl_engine.c.

References rb_str_new2.

Referenced by ossl_engine_get_cmds().

static VALUE ossl_engine_ctrl_cmd ( int  argc,
VALUE argv,
VALUE  self 
) [static]

Definition at line 296 of file ossl_engine.c.

References eEngineError, GetEngine, NIL_P, NULL, ossl_raise(), rb_scan_args(), RSTRING_PTR, and StringValue.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_finish ( VALUE  self  )  [static]

Definition at line 181 of file ossl_engine.c.

References eEngineError, GetEngine, NULL, ossl_raise(), and Qnil.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_get_cipher ( VALUE  self,
VALUE  name 
) [static]

Definition at line 193 of file ossl_engine.c.

References eEngineError, GetEngine, NULL, ossl_cipher_new(), ossl_raise(), and StringValuePtr.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_get_cmds ( VALUE  self  )  [static]
static VALUE ossl_engine_get_digest ( VALUE  self,
VALUE  name 
) [static]

Definition at line 216 of file ossl_engine.c.

References eEngineError, GetEngine, NULL, ossl_digest_new(), ossl_raise(), and StringValuePtr.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_get_id ( VALUE  self  )  [static]

Definition at line 165 of file ossl_engine.c.

References GetEngine, and rb_str_new2.

Referenced by Init_ossl_engine(), and ossl_engine_inspect().

static VALUE ossl_engine_get_name ( VALUE  self  )  [static]

Definition at line 173 of file ossl_engine.c.

References GetEngine, and rb_str_new2.

Referenced by Init_ossl_engine(), and ossl_engine_inspect().

static VALUE ossl_engine_inspect ( VALUE  self  )  [static]
static VALUE ossl_engine_load_privkey ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ossl_engine_load_pubkey ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ossl_engine_s_alloc ( VALUE  klass  )  [static]

Definition at line 151 of file ossl_engine.c.

References eEngineError, NULL, ossl_raise(), and WrapEngine.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_s_by_id ( VALUE  klass,
VALUE  id 
) [static]
static VALUE ossl_engine_s_cleanup ( VALUE  self  )  [static]

Definition at line 102 of file ossl_engine.c.

References Qnil.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_s_engines ( VALUE  klass  )  [static]

Definition at line 111 of file ossl_engine.c.

References rb_ary_new(), rb_ary_push(), and WrapEngine.

Referenced by Init_ossl_engine().

static VALUE ossl_engine_s_load ( int  argc,
VALUE argv,
VALUE  klass 
) [static]
static VALUE ossl_engine_set_default ( VALUE  self,
VALUE  flag 
) [static]

Definition at line 284 of file ossl_engine.c.

References GetEngine, NUM2INT, and Qtrue.

Referenced by Init_ossl_engine().


Variable Documentation

Definition at line 35 of file ossl_engine.c.

Referenced by Init_ossl_engine().


Generated on 1 Aug 2012 for Ruby by  doxygen 1.6.1