aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_ssl.h')
-rw-r--r--ext/openssl/ossl_ssl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.h b/ext/openssl/ossl_ssl.h
index a1e14a3805..faa5d3678f 100644
--- a/ext/openssl/ossl_ssl.h
+++ b/ext/openssl/ossl_ssl.h
@@ -16,7 +16,7 @@
} while (0)
#define GetSSLSession(obj, sess) do { \
- Data_Get_Struct((obj), SSL_SESSION, (sess)); \
+ TypedData_Get_Struct((obj), SSL_SESSION, &ossl_ssl_session_type, (sess)); \
if (!(sess)) { \
ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \
} \
@@ -27,6 +27,7 @@
GetSSLSession((obj), (sess)); \
} while (0)
+extern const rb_data_type_t ossl_ssl_session_type;
extern VALUE mSSL;
extern VALUE eSSLError;
extern VALUE cSSLSocket;