Ruby: ext/openssl/ossl_engine.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions | Variables
ossl_engine.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Macros
#define | NewEngine(klass) TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)
#define | SetEngine(obj, engine)
#define | GetEngine(obj, engine)
#define | OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x)
#define | DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))

## Functions
void | Init_ossl_engine (void)

## Variables
VALUE | cEngine
VALUE | eEngineError

## Macro Definition Documentation

## ◆ DefEngineConst

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

Definition at line 516 of file ossl_engine.c.

## ◆ GetEngine

#define GetEngine | ( |  | obj,
|  |  | engine
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), ENGINE, &ossl_engine_type, (engine)); \
if (!(engine)) { \
ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

Definition at line 22 of file ossl_engine.c.

## ◆ NewEngine

#define NewEngine | ( |  | klass | ) | TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)

Definition at line 14 of file ossl_engine.c.

## ◆ OSSL_ENGINE_LOAD_IF_MATCH

#define OSSL_ENGINE_LOAD_IF_MATCH | ( |  | engine_name,
|  |  | x
| ) |  |

Value:
do{\
if(!strcmp(#engine_name, RSTRING_PTR(name))){\
ENGINE_load_##engine_name();\
return Qtrue;\
}\
}while(0)
RSTRING_PTR
#define RSTRING_PTR(string)
Definition: fbuffer.h:19
name
const char * name
Definition: nkf.c:208
Qtrue
#define Qtrue
Definition: special_consts.h:52

Definition at line 60 of file ossl_engine.c.

## ◆ SetEngine

#define SetEngine | ( |  | obj,
|  |  | engine
| ) |  |

Value:
do { \
if (!(engine)) { \
ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (engine); \
} while(0)

Definition at line 16 of file ossl_engine.c.

## Function Documentation

## ◆ Init_ossl_engine()

void Init_ossl_engine | ( | void |  | ) |

Definition at line 519 of file ossl_engine.c.

References cEngine, DefEngineConst, eEngineError, eOSSLError, mOSSL, rb_cObject, rb_define_class_under(), rb_define_method, rb_define_module(), rb_define_singleton_method, rb_eStandardError, and rb_undef_alloc_func().

Referenced by Init_openssl().

## Variable Documentation

## ◆ cEngine

VALUE cEngine

Definition at line 39 of file ossl_engine.c.

Referenced by Init_ossl_engine().

## ◆ eEngineError

VALUE eEngineError

Definition at line 44 of file ossl_engine.c.

Referenced by Init_ossl_engine().