diff options
-rw-r--r-- | src/openssl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index 4564061..78ab3a0 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -7609,7 +7609,13 @@ static SSL *ssl_push(lua_State *L, SSL *ssl) { | |||
7609 | } /* ssl_push() */ | 7609 | } /* ssl_push() */ |
7610 | 7610 | ||
7611 | static int ssl_new(lua_State *L) { | 7611 | static int ssl_new(lua_State *L) { |
7612 | lua_pushnil(L); | 7612 | SSL_CTX *ctx = checksimple(L, 1, SSL_CTX_CLASS); |
7613 | SSL **ud = prepsimple(L, SSL_CLASS); | ||
7614 | |||
7615 | *ud = SSL_new(ctx); | ||
7616 | |||
7617 | if (!*ud) | ||
7618 | return auxL_error(L, auxL_EOPENSSL, "ssl.new"); | ||
7613 | 7619 | ||
7614 | return 1; | 7620 | return 1; |
7615 | } /* ssl_new() */ | 7621 | } /* ssl_new() */ |