aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl.h
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2014-10-27 11:12:18 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2014-10-27 11:12:18 +0900
commitad6b55f73a85ab960d2e5f1876f31081bb59c643 (patch)
tree6001aed0d9c0f6a77d04cc550320bce73fe56130 /ext/openssl/ossl_ssl.h
parent1134fb9ad0fd60563006defc558f57f8523dd6e8 (diff)
downloadruby-openssl-ad6b55f73a85ab960d2e5f1876f31081bb59c643.tar.gz
import ruby trunk
Diffstat (limited to 'ext/openssl/ossl_ssl.h')
-rw-r--r--ext/openssl/ossl_ssl.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/openssl/ossl_ssl.h b/ext/openssl/ossl_ssl.h
new file mode 100644
index 00000000..034762fc
--- /dev/null
+++ b/ext/openssl/ossl_ssl.h
@@ -0,0 +1,36 @@
+/*
+ * $Id$
+ * 'OpenSSL for Ruby' project
+ * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
+ * All rights reserved.
+ */
+/*
+ * This program is licenced under the same licence as Ruby.
+ * (See the file 'LICENCE'.)
+ */
+#if !defined(_OSSL_SSL_H_)
+#define _OSSL_SSL_H_
+
+#define GetSSLSession(obj, sess) do { \
+ Data_Get_Struct((obj), SSL_SESSION, (sess)); \
+ if (!(sess)) { \
+ ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
+ } \
+} while (0)
+
+#define SafeGetSSLSession(obj, sess) do { \
+ OSSL_Check_Kind((obj), cSSLSession); \
+ GetSSLSession((obj), (sess)); \
+} while (0)
+
+extern VALUE mSSL;
+extern VALUE eSSLError;
+extern VALUE cSSLSocket;
+extern VALUE cSSLContext;
+extern VALUE cSSLSession;
+
+void Init_ossl_ssl(void);
+void Init_ossl_ssl_session(void);
+
+#endif /* _OSSL_SSL_H_ */
+