summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 78ab3a0..39612e0 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -7720,7 +7720,7 @@ static int ssl_getHostName(lua_State *L) {
7720 7720
7721static int ssl_setHostName(lua_State *L) { 7721static int ssl_setHostName(lua_State *L) {
7722 SSL *ssl = checksimple(L, 1, SSL_CLASS); 7722 SSL *ssl = checksimple(L, 1, SSL_CLASS);
7723 const char *host = luaL_checkstring(L, 2); 7723 const char *host = luaL_optstring(L, 2, NULL);
7724 7724
7725 if (!SSL_set_tlsext_host_name(ssl, host)) 7725 if (!SSL_set_tlsext_host_name(ssl, host))
7726 return auxL_error(L, auxL_EOPENSSL, "ssl:setHostName"); 7726 return auxL_error(L, auxL_EOPENSSL, "ssl:setHostName");