aboutsummaryrefslogtreecommitdiffstats
path: root/openssl.c
diff options
context:
space:
mode:
authorLibravatarLibravatar William Ahern <william@server.local> 2012-10-15 12:39:39 -0700
committerLibravatarLibravatar William Ahern <william@server.local> 2012-10-15 12:39:39 -0700
commit728572def225bd84236ef0d93e8273b27a683063 (patch)
tree09f8b14893316260e0542515150edec7e0f78f18 /openssl.c
parent3575f08d8eb9f6b2cb1b334c5108af1e00699acf (diff)
downloadluaossl-728572def225bd84236ef0d93e8273b27a683063.tar.gz
luaossl-728572def225bd84236ef0d93e8273b27a683063.tar.bz2
luaossl-728572def225bd84236ef0d93e8273b27a683063.zip
-n
forgot that :starttls can also take an SSL_CTX object, and update the documentation
Diffstat (limited to 'openssl.c')
-rw-r--r--openssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openssl.c b/openssl.c
index 415b21e..5062b7d 100644
--- a/openssl.c
+++ b/openssl.c
@@ -2986,10 +2986,10 @@ static int sx_new(lua_State *L) {
static const char *opts[] = {
"SSLv2", "SSLv3", "SSLv23", "SSL", "TLSv1", "TLS", NULL
};
- SSL_CTX **ud = prepsimple(L, SSL_CTX_CLASS);
/* later versions of SSL declare a const qualifier on the return type */
__typeof__(&TLSv1_client_method) method = &TLSv1_client_method;
_Bool srv;
+ SSL_CTX **ud;
lua_settop(L, 2);
srv = lua_toboolean(L, 2);
@@ -3015,6 +3015,8 @@ static int sx_new(lua_State *L) {
break;
}
+ ud = prepsimple(L, SSL_CTX_CLASS);
+
if (!(*ud = SSL_CTX_new(method())))
return throwssl(L, "ssl.context.new");