Ruby: ext/openssl/ossl_ssl.c File Reference

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

Data Structures | Macros | Functions | Variables
ossl_ssl.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Data Structures
struct | tmp_dh_callback_args
struct | npn_select_cb_common_args

## Macros
#define | numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
#define | TO_SOCKET(s) (s)
#define | GetSSLCTX(obj, ctx)
#define | ssl_get_error(ssl, ret) SSL_get_error((ssl), (ret))
#define | DefIVarID(name)

## Functions
void | Init_ossl_ssl (void)

## Variables
VALUE | mSSL
VALUE | cSSLContext
VALUE | cSSLSocket
const rb_data_type_t | ossl_ssl_type

## Macro Definition Documentation

## ◆ DefIVarID

#define DefIVarID | ( |  | name | ) |

Value:
do \
id_i_##name = rb_intern_const("@"#name); while (0)
name
const char * name
Definition: nkf.c:208

## ◆ GetSSLCTX

#define GetSSLCTX | ( |  | obj,
|  |  | ctx
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), SSL_CTX, &ossl_sslctx_type, (ctx)); \
} while (0)

Definition at line 28 of file ossl_ssl.c.

## ◆ numberof

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

Definition at line 14 of file ossl_ssl.c.

## ◆ ssl_get_error

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

Definition at line 1647 of file ossl_ssl.c.

## ◆ TO_SOCKET

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

Definition at line 25 of file ossl_ssl.c.

## Function Documentation

## ◆ Init_ossl_ssl()

void Init_ossl_ssl | ( | void |  | ) |

Definition at line 2507 of file ossl_ssl.c.

References cSSLContext, cSSLSocket, DefIVarID, eOSSLError, ID2SYM, id_call, id_each, Init_ossl_ssl_session(), INT2NUM, key, LONG2NUM, mOSSL, mSSL, ossl_raise(), Qfalse, Qtrue, rb_attr(), rb_cIO, 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_eRuntimeError, rb_eStandardError, rb_f_notimplement(), rb_include_module(), rb_mWaitReadable, rb_mWaitWritable, rb_undef_method(), and ULONG2NUM.

Referenced by Init_openssl().

## Variable Documentation

## ◆ cSSLContext

VALUE cSSLContext

Definition at line 35 of file ossl_ssl.c.

Referenced by Init_ossl_ssl().

## ◆ cSSLSocket

VALUE cSSLSocket

Definition at line 36 of file ossl_ssl.c.

Referenced by Init_ossl_ssl().

## ◆ mSSL

VALUE mSSL

Definition at line 32 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), and Init_ossl_ssl_session().

## ◆ ossl_ssl_type

const rb_data_type_t ossl_ssl_type

Initial value:
= {
"OpenSSL/SSL",
{
ossl_ssl_mark, ossl_ssl_free,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
}
RUBY_TYPED_FREE_IMMEDIATELY
@ RUBY_TYPED_FREE_IMMEDIATELY
Definition: rtypeddata.h:62

Definition at line 1556 of file ossl_ssl.c.