Skip to content

Commit

Permalink
bugfix: undefined symbol SSL_client_hello_get0_ext when linking again…
Browse files Browse the repository at this point in the history
…st libressl.
  • Loading branch information
zhuizhuhaomeng authored Jul 7, 2024
1 parent 6477a7b commit 39d165c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ngx_http_lua_ssl_client_helloby.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ int
ngx_http_lua_ffi_ssl_get_client_hello_server_name(ngx_http_request_t *r,
const char **name, size_t *namelen, char **err)
{
#ifdef LIBRESSL_VERSION_NUMBER
*err = "LibreSSL does not support by ssl_client_hello_by_lua*";
return NGX_ERROR;
#else
ngx_ssl_conn_t *ssl_conn;
#ifdef SSL_ERROR_WANT_CLIENT_HELLO_CB
const unsigned char *p;
Expand Down Expand Up @@ -619,13 +623,18 @@ ngx_http_lua_ffi_ssl_get_client_hello_server_name(ngx_http_request_t *r,
*err = "no TLS extension support";
return NGX_ERROR;
#endif
#endif /* LIBRESSL_VERSION_NUMBER */
}


int
ngx_http_lua_ffi_ssl_get_client_hello_ext(ngx_http_request_t *r,
unsigned int type, const unsigned char **out, size_t *outlen, char **err)
{
#ifdef LIBRESSL_VERSION_NUMBER
*err = "LibreSSL does not support by ssl_client_hello_by_lua*";
return NGX_ERROR;
#else
ngx_ssl_conn_t *ssl_conn;

if (r->connection == NULL || r->connection->ssl == NULL) {
Expand All @@ -649,7 +658,7 @@ ngx_http_lua_ffi_ssl_get_client_hello_ext(ngx_http_request_t *r,
*err = "OpenSSL too old to support this function";
return NGX_ERROR;
#endif

#endif /* LIBRESSL_VERSION_NUMBER */
}


Expand Down

0 comments on commit 39d165c

Please sign in to comment.