Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
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;
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_ */
VALUE mSSL
Definition: ossl_ssl.c:32
VALUE cSSLSession
const rb_data_type_t ossl_ssl_type
Definition: ossl_ssl.c:1552
void Init_ossl_ssl_session(void)
VALUE cSSLSocket
Definition: ossl_ssl.c:36
const rb_data_type_t ossl_ssl_session_type
void Init_ossl_ssl(void)
Definition: ossl_ssl.c:2455
unsigned long VALUE