summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2016-01-03 15:18:38 +1100
committerdaurnimator <quae@daurnimator.com>2016-01-03 15:18:38 +1100
commita8f37577ca152e96d09e01c8416260d314cdc1b8 (patch)
tree0b2c452fdcc5bdea79a60f9036b2020f031e34c3
parent86a593a0548563d156d7adc55cff179340a811c8 (diff)
downloadluaossl-a8f37577ca152e96d09e01c8416260d314cdc1b8.tar.gz
luaossl-a8f37577ca152e96d09e01c8416260d314cdc1b8.tar.bz2
luaossl-a8f37577ca152e96d09e01c8416260d314cdc1b8.zip
Fix incorrect type check in ssl:{set,get,clear}Options
Was checking for SSL_CTX instead of SSL
-rw-r--r--src/openssl.c6
1 files changed, 3 insertions, 3 deletions
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) {
6280 6280
6281 6281
6282static int ssl_setOptions(lua_State *L) { 6282static int ssl_setOptions(lua_State *L) {
6283 SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS); 6283 SSL *ssl = checksimple(L, 1, SSL_CLASS);
6284 auxL_Integer options = auxL_checkinteger(L, 2); 6284 auxL_Integer options = auxL_checkinteger(L, 2);
6285 6285
6286 auxL_pushinteger(L, SSL_set_options(ssl, options)); 6286 auxL_pushinteger(L, SSL_set_options(ssl, options));
@@ -6290,7 +6290,7 @@ static int ssl_setOptions(lua_State *L) {
6290 6290
6291 6291
6292static int ssl_getOptions(lua_State *L) { 6292static int ssl_getOptions(lua_State *L) {
6293 SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS); 6293 SSL *ssl = checksimple(L, 1, SSL_CLASS);
6294 6294
6295 auxL_pushinteger(L, SSL_get_options(ssl)); 6295 auxL_pushinteger(L, SSL_get_options(ssl));
6296 6296
@@ -6299,7 +6299,7 @@ static int ssl_getOptions(lua_State *L) {
6299 6299
6300 6300
6301static int ssl_clearOptions(lua_State *L) { 6301static int ssl_clearOptions(lua_State *L) {
6302 SSL *ssl = checksimple(L, 1, SSL_CTX_CLASS); 6302 SSL *ssl = checksimple(L, 1, SSL_CLASS);
6303 auxL_Integer options = auxL_checkinteger(L, 2); 6303 auxL_Integer options = auxL_checkinteger(L, 2);
6304 6304
6305 auxL_pushinteger(L, SSL_clear_options(ssl, options)); 6305 auxL_pushinteger(L, SSL_clear_options(ssl, options));