summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2016-11-14 14:09:41 +1100
committerdaurnimator <quae@daurnimator.com>2016-11-14 14:32:39 +1100
commit73a56ebd71ab15006f699e3719e049161091253b (patch)
tree50e54927e741af56dd1f881ded3110ed34149ffd
parentcb727f97f2e00512c70631210de2d8b951e81587 (diff)
downloadluaossl-73a56ebd71ab15006f699e3719e049161091253b.tar.gz
luaossl-73a56ebd71ab15006f699e3719e049161091253b.tar.bz2
luaossl-73a56ebd71ab15006f699e3719e049161091253b.zip
Fill in ssl_new
-rw-r--r--src/openssl.c8
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
7611static int ssl_new(lua_State *L) { 7611static 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() */