Ruby: ext/openssl/ossl_ssl.h Source File

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

ossl_ssl.h
Go to the documentation of this file.
1/*
2 * 'OpenSSL for Ruby' project
3 * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
4 * All rights reserved.
5 */
6/*
7 * This program is licensed under the same licence as Ruby.
8 * (See the file 'LICENCE'.)
9 */
10#if !defined(_OSSL_SSL_H_)
11#define _OSSL_SSL_H_
12
13#define GetSSL(obj, ssl) do { \
14 TypedData_Get_Struct((obj), SSL, &ossl_ssl_type, (ssl)); \
15 if (!(ssl)) { \
16 ossl_raise(rb_eRuntimeError, "SSL is not initialized"); \
17 } \
18} while (0)
19
20#define GetSSLSession(obj, sess) do { \
21 TypedData_Get_Struct((obj), SSL_SESSION, &ossl_ssl_session_type, (sess)); \
22 if (!(sess)) { \
23 ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
24 } \
25} while (0)
26
27extern const rb_data_type_t ossl_ssl_type;
28extern const rb_data_type_t ossl_ssl_session_type;
29extern VALUE mSSL;
30extern VALUE cSSLSocket;
31extern VALUE cSSLSession;
32
33void Init_ossl_ssl(void);
34void Init_ossl_ssl_session(void);
35
36#endif /* _OSSL_SSL_H_ */
mSSL
VALUE mSSL
Definition: ossl_ssl.c:32
cSSLSession
VALUE cSSLSession
Definition: ossl_ssl_session.c:7
ossl_ssl_type
const rb_data_type_t ossl_ssl_type
Definition: ossl_ssl.c:1556
Init_ossl_ssl_session
void Init_ossl_ssl_session(void)
Definition: ossl_ssl_session.c:308
cSSLSocket
VALUE cSSLSocket
Definition: ossl_ssl.c:36
ossl_ssl_session_type
const rb_data_type_t ossl_ssl_session_type
Definition: ossl_ssl_session.c:16
Init_ossl_ssl
void Init_ossl_ssl(void)
Definition: ossl_ssl.c:2507
rb_data_type_struct
Definition: rtypeddata.h:70
VALUE
unsigned long VALUE
Definition: value.h:38