* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / ext / openssl / ossl_ssl.h
blob487f41216cf35658b9b9a91adfec5a3ce23f6474
1 /*
2 * $Id$
3 * 'OpenSSL for Ruby' project
4 * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
5 * All rights reserved.
6 */
7 /*
8 * This program is licenced under the same licence as Ruby.
9 * (See the file 'LICENCE'.)
11 #if !defined(_OSSL_SSL_H_)
12 #define _OSSL_SSL_H_
14 #define GetSSLSession(obj, sess) do { \
15 Data_Get_Struct(obj, SSL_SESSION, sess); \
16 if (!sess) { \
17 ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
18 } \
19 } while (0)
21 #define SafeGetSSLSession(obj, sess) do { \
22 OSSL_Check_Kind(obj, cSSLSession); \
23 GetSSLSession(obj, sess); \
24 } while (0)
26 extern VALUE mSSL;
27 extern VALUE eSSLError;
28 extern VALUE cSSLSocket;
29 extern VALUE cSSLContext;
30 extern VALUE cSSLSession;
32 void Init_ossl_ssl(void);
33 void Init_ossl_ssl_session(void);
35 #endif /* _OSSL_SSL_H_ */