summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2015-03-01 02:09:15 -0500
committerdaurnimator <quae@daurnimator.com>2015-03-01 02:09:15 -0500
commite08e76d91148fb360c918ac08be4c7c6ad76e749 (patch)
tree9247ba207cc1509e0a45decb437f499f550d8cf9 /src
parenta7dd84a94c8543ffa2dc044099cbcb731fca30d4 (diff)
downloadluaossl-e08e76d91148fb360c918ac08be4c7c6ad76e749.tar.gz
luaossl-e08e76d91148fb360c918ac08be4c7c6ad76e749.tar.bz2
luaossl-e08e76d91148fb360c918ac08be4c7c6ad76e749.zip
SSL_CTX_set_alpn_protos takes the full length, not the number of strings
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openssl.c b/src/openssl.c
index f9ff4d5..562927d 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -4544,8 +4544,8 @@ static int sx_setAlpnProtos(lua_State *L) {
4544 } 4544 }
4545done: 4545done:
4546 luaL_pushresult(&B); 4546 luaL_pushresult(&B);
4547 4547 tmp = lua_tolstring(L, -1, &len);
4548 if (0 != SSL_CTX_set_alpn_protos(ctx, (const unsigned char*)lua_tostring(L, -1), protos_len)) { 4548 if (0 != SSL_CTX_set_alpn_protos(ctx, (const unsigned char*)tmp, len)) {
4549 lua_pushnil(L); 4549 lua_pushnil(L);
4550 return 1; 4550 return 1;
4551 } 4551 }