Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
ext
openssl
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
27
extern
const
rb_data_type_t
ossl_ssl_type
;
28
extern
const
rb_data_type_t
ossl_ssl_session_type
;
29
extern
VALUE
mSSL
;
30
extern
VALUE
cSSLSocket
;
31
extern
VALUE
cSSLSession
;
32
33
void
Init_ossl_ssl
(
void
);
34
void
Init_ossl_ssl_session
(
void
);
35
36
#endif
/* _OSSL_SSL_H_ */
Init_ossl_ssl
void Init_ossl_ssl(void)
Definition:
ossl_ssl.c:2377
ossl_ssl_type
const rb_data_type_t ossl_ssl_type
Definition:
ossl_ssl.c:1395
ossl_ssl_session_type
const rb_data_type_t ossl_ssl_session_type
Definition:
ossl_ssl_session.c:16
cSSLSession
VALUE cSSLSession
Definition:
ossl_ssl_session.c:7
VALUE
unsigned long VALUE
Definition:
value.h:38
Init_ossl_ssl_session
void Init_ossl_ssl_session(void)
Definition:
ossl_ssl_session.c:303
cSSLSocket
VALUE cSSLSocket
Definition:
ossl_ssl.c:36
rb_data_type_struct
Definition:
rtypeddata.h:70
mSSL
VALUE mSSL
Definition:
ossl_ssl.c:32
Generated by
1.8.17