From a8f37577ca152e96d09e01c8416260d314cdc1b8 Mon Sep 17 00:00:00 2001
From: daurnimator <quae@daurnimator.com>
Date: Sun, 3 Jan 2016 15:18:38 +1100
Subject: Fix incorrect type check in ssl:{set,get,clear}Options

Was checking for SSL_CTX instead of SSL
---
 src/openssl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/openssl.c b/src/openssl.c
index 499bcce..de23161 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -6280,7 +6280,7 @@ static int ssl_interpose(lua_State *L) {
 
 
 static int ssl_setOptions(lua_State *L) {
-	SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS);
+	SSL *ssl = checksimple(L, 1, SSL_CLASS);
 	auxL_Integer options = auxL_checkinteger(L, 2);
 
 	auxL_pushinteger(L, SSL_set_options(ssl, options));
@@ -6290,7 +6290,7 @@ static int ssl_setOptions(lua_State *L) {
 
 
 static int ssl_getOptions(lua_State *L) {
-	SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS);
+	SSL *ssl = checksimple(L, 1, SSL_CLASS);
 
 	auxL_pushinteger(L, SSL_get_options(ssl));
 
@@ -6299,7 +6299,7 @@ static int ssl_getOptions(lua_State *L) {
 
 
 static int ssl_clearOptions(lua_State *L) {
-	SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS);
+	SSL *ssl = checksimple(L, 1, SSL_CLASS);
 	auxL_Integer options = auxL_checkinteger(L, 2);
 
 	auxL_pushinteger(L, SSL_clear_options(ssl, options));
-- 
cgit v1.2.3-55-g6feb