Ruby: ext/openssl/ossl_ssl.h File Reference

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

Macros | Functions | Variables
ossl_ssl.h File Reference

Go to the source code of this file.

## Macros
#define | GetSSL(obj, ssl)
#define | GetSSLSession(obj, sess)

## Functions
void | Init_ossl_ssl (void)
void | Init_ossl_ssl_session (void)

## Variables
const rb_data_type_t | ossl_ssl_type
const rb_data_type_t | ossl_ssl_session_type
VALUE | mSSL
VALUE | cSSLSocket
VALUE | cSSLSession

## Macro Definition Documentation

## ◆ GetSSL

#define GetSSL | ( |  | obj,
|  |  | ssl
| ) |  |

Value:
do { \
TypedData_Get_Struct((obj), SSL, &ossl_ssl_type, (ssl)); \
if (!(ssl)) { \
ossl_raise(rb_eRuntimeError, "SSL is not initialized"); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055
ossl_ssl_type
const rb_data_type_t ossl_ssl_type
Definition: ossl_ssl.c:1556

Definition at line 13 of file ossl_ssl.h.

## ◆ GetSSLSession

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

Value:
do { \
TypedData_Get_Struct((obj), SSL_SESSION, &ossl_ssl_session_type, (sess)); \
if (!(sess)) { \
ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
} \
} while (0)
ossl_ssl_session_type
const rb_data_type_t ossl_ssl_session_type
Definition: ossl_ssl_session.c:16

Definition at line 20 of file ossl_ssl.h.

## 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().

## ◆ Init_ossl_ssl_session()

void Init_ossl_ssl_session | ( | void |  | ) |

Definition at line 308 of file ossl_ssl_session.c.

References cSSLSession, eOSSLError, mOSSL, mSSL, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method, rb_define_module(), rb_define_module_under(), and rb_eStandardError.

Referenced by Init_ossl_ssl().

## Variable Documentation

## ◆ cSSLSession

VALUE cSSLSession
| extern

Definition at line 7 of file ossl_ssl_session.c.

Referenced by Init_ossl_ssl_session().

## ◆ cSSLSocket

VALUE cSSLSocket
| extern

Definition at line 36 of file ossl_ssl.c.

Referenced by Init_ossl_ssl().

## ◆ mSSL

VALUE mSSL
| extern

Definition at line 32 of file ossl_ssl.c.

Referenced by Init_ossl_ssl(), and Init_ossl_ssl_session().

## ◆ ossl_ssl_session_type

const rb_data_type_t ossl_ssl_session_type
| extern

Definition at line 16 of file ossl_ssl_session.c.

## ◆ ossl_ssl_type

const rb_data_type_t ossl_ssl_type
| extern

Definition at line 1556 of file ossl_ssl.c.