Defines | Functions | Variables

ext/openssl/ossl_config.c File Reference

#include "ossl.h"
Include dependency graph for ossl_config.c:

Go to the source code of this file.

Defines

#define WrapConfig(klass, obj, conf)
#define GetConfig(obj, conf)
#define SafeGetConfig(obj, conf)

Functions

static CONF * parse_config (VALUE, CONF *)
CONF * GetConfigPtr (VALUE obj)
CONF * DupConfigPtr (VALUE obj)
static VALUE ossl_config_s_parse (VALUE klass, VALUE str)
static VALUE ossl_config_s_alloc (VALUE klass)
static VALUE ossl_config_copy (VALUE self, VALUE other)
static VALUE ossl_config_initialize (int argc, VALUE *argv, VALUE self)
static VALUE ossl_config_add_value (VALUE self, VALUE section, VALUE name, VALUE value)
static void rb_ossl_config_modify_check (VALUE config)
static VALUE ossl_config_add_value_m (VALUE self, VALUE section, VALUE name, VALUE value)
static VALUE ossl_config_get_value (VALUE self, VALUE section, VALUE name)
static VALUE ossl_config_get_value_old (int argc, VALUE *argv, VALUE self)
static VALUE set_conf_section_i (VALUE i, VALUE *arg)
static VALUE ossl_config_set_section (VALUE self, VALUE section, VALUE hash)
static VALUE ossl_config_get_section (VALUE self, VALUE section)
static VALUE ossl_config_get_section_old (VALUE self, VALUE section)
static VALUE ossl_config_get_sections (VALUE self)
static VALUE ossl_config_to_s (VALUE self)
static VALUE ossl_config_each (VALUE self)
static VALUE ossl_config_inspect (VALUE self)
void Init_ossl_config ()

Variables

VALUE cConfig
VALUE eConfigError

Define Documentation

#define GetConfig (   obj,
  conf 
)
Value:
do { \
    Data_Get_Struct(obj, CONF, conf); \
    if (!conf) { \
        ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
    } \
} while (0)

Definition at line 19 of file ossl_config.c.

Referenced by ossl_config_add_value(), ossl_config_copy(), ossl_config_get_section(), ossl_config_get_value(), and ossl_config_initialize().

#define SafeGetConfig (   obj,
  conf 
)
Value:
do { \
    OSSL_Check_Kind(obj, cConfig); \
    GetConfig(obj, conf); \
} while(0);

Definition at line 25 of file ossl_config.c.

Referenced by GetConfigPtr().

#define WrapConfig (   klass,
  obj,
  conf 
)
Value:
do { \
    if (!conf) { \
        ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, NCONF_free, conf); \
} while (0)

Definition at line 13 of file ossl_config.c.

Referenced by ossl_config_s_alloc(), and ossl_config_s_parse().


Function Documentation

CONF* DupConfigPtr ( VALUE  obj  ) 

Definition at line 53 of file ossl_config.c.

References cConfig, NULL, OSSL_Check_Kind, parse_config(), rb_funcall(), and rb_intern.

CONF* GetConfigPtr ( VALUE  obj  ) 

Definition at line 43 of file ossl_config.c.

References SafeGetConfig.

Referenced by ossl_x509extfactory_create_ext().

void Init_ossl_config ( void   ) 
static VALUE ossl_config_add_value ( VALUE  self,
VALUE  section,
VALUE  name,
VALUE  value 
) [static]
static VALUE ossl_config_add_value_m ( VALUE  self,
VALUE  section,
VALUE  name,
VALUE  value 
) [static]

Definition at line 205 of file ossl_config.c.

References ossl_config_add_value(), and rb_ossl_config_modify_check().

Referenced by Init_ossl_config().

static VALUE ossl_config_copy ( VALUE  self,
VALUE  other 
) [static]

Definition at line 117 of file ossl_config.c.

References GetConfig, parse_config(), rb_funcall(), and rb_intern.

Referenced by Init_ossl_config().

static VALUE ossl_config_each ( VALUE  self  )  [static]

Definition at line 440 of file ossl_config.c.

References rb_warn().

Referenced by Init_ossl_config().

static VALUE ossl_config_get_section ( VALUE  self,
VALUE  section 
) [static]
static VALUE ossl_config_get_section_old ( VALUE  self,
VALUE  section 
) [static]

Definition at line 309 of file ossl_config.c.

References ossl_config_get_section(), and rb_warn().

Referenced by Init_ossl_config().

static VALUE ossl_config_get_sections ( VALUE  self  )  [static]

Definition at line 426 of file ossl_config.c.

References rb_ary_new(), and rb_warn().

Referenced by Init_ossl_config(), and ossl_config_inspect().

static VALUE ossl_config_get_value ( VALUE  self,
VALUE  section,
VALUE  name 
) [static]

Definition at line 215 of file ossl_config.c.

References GetConfig, rb_str_new2(), RSTRING_PTR, and StringValue.

Referenced by Init_ossl_config(), and ossl_config_get_value_old().

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

Definition at line 233 of file ossl_config.c.

References name, NIL_P, ossl_config_get_value(), rb_scan_args(), rb_str_new2(), and rb_warn().

Referenced by Init_ossl_config().

static VALUE ossl_config_initialize ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ossl_config_inspect ( VALUE  self  )  [static]
static VALUE ossl_config_s_alloc ( VALUE  klass  )  [static]

Definition at line 104 of file ossl_config.c.

References eConfigError, NULL, ossl_raise(), and WrapConfig.

Referenced by Init_ossl_config().

static VALUE ossl_config_s_parse ( VALUE  klass,
VALUE  str 
) [static]

Definition at line 92 of file ossl_config.c.

References NULL, parse_config(), and WrapConfig.

Referenced by Init_ossl_config().

static VALUE ossl_config_set_section ( VALUE  self,
VALUE  section,
VALUE  hash 
) [static]

Definition at line 265 of file ossl_config.c.

References rb_block_call, rb_intern, rb_ossl_config_modify_check(), and set_conf_section_i().

Referenced by Init_ossl_config().

static VALUE ossl_config_to_s ( VALUE  self  )  [static]

Definition at line 433 of file ossl_config.c.

References rb_str_new(), and rb_warn().

Referenced by Init_ossl_config().

static CONF * parse_config ( VALUE  str,
CONF *  dst 
) [static]

Definition at line 67 of file ossl_config.c.

References eConfigError, NULL, ossl_obj2bio(), and ossl_raise().

Referenced by DupConfigPtr(), ossl_config_copy(), and ossl_config_s_parse().

static void rb_ossl_config_modify_check ( VALUE  config  )  [static]
static VALUE set_conf_section_i ( VALUE  i,
VALUE arg 
) [static]

Definition at line 252 of file ossl_config.c.

References Check_Type, name, ossl_config_add_value(), rb_ary_entry(), and T_ARRAY.

Referenced by ossl_config_set_section().


Variable Documentation

Definition at line 33 of file ossl_config.c.

Referenced by DupConfigPtr(), and Init_ossl_config().