You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a Lua table containing the decimal representations of the ciphers sent by the client on success.
137
+
138
+
GREASE ciphers are also returned by the underlying OPENSSL function (SSL_client_hello_get0_ciphers) but excluded by the lua implementation of get_client_hello_ciphers().
139
+
140
+
In case of errors, `nil` and a string describing the error are returned.
141
+
142
+
This function can only be called in the context of [ssl_client_hello_by_lua*](https://github.com/openresty/lua-nginx-module/#ssl_client_hello_by_lua_block).
143
+
144
+
Example:
145
+
146
+
```nginx
147
+
# nginx.conf
148
+
server {
149
+
listen 443 ssl;
150
+
server_name test.com;
151
+
ssl_client_hello_by_lua_block {
152
+
local ssl_clt = require "ngx.ssl.clienthello"
153
+
local ciphers, err = ssl_clt.get_client_hello_ciphers()
154
+
if not ciphers then
155
+
ngx.log(ngx.ERR, "failed to get_client_hello_ciphers()")
@@ -140,6 +179,11 @@ Note that the ext is gotten from the raw extensions of the client hello message
140
179
141
180
So this function can only be called in the context of [ssl_client_hello_by_lua*](https://github.com/openresty/lua-nginx-module/#ssl_client_hello_by_lua_block).
142
181
182
+
GREASE extensions are excluded by the underlying OPENSSL function (SSL_client_hello_get1_extensions_present)
183
+
184
+
Most modern browsers will randomize the order of the extensions so you may want to sort the table before working with it.
0 commit comments