Skip to content

Commit fec7331

Browse files
authored
feat(stream): add upstream ssl ffi function and stream client ssl ffi function (#50)
1. extend stream module upstream ssl client function to support dynamic upstream ssl cert 2. extend stream tls request client_certificate_chain
1 parent d6ce64d commit fec7331

12 files changed

+2049
-549
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ resty.kong.tls.disable\_session\_reuse
148148

149149
**context:** *ssl_certificate_by_lua**
150150

151-
**subsystems:** *http*
151+
**subsystems:** *http* *stream*
152152

153153
Prevents the TLS session for the current connection from being reused by
154154
disabling session ticket and session ID for the current TLS connection.
@@ -162,9 +162,9 @@ resty.kong.tls.get\_full\_client\_certificate\_chain
162162
----------------------------------------------------
163163
**syntax:** *pem_chain, err = resty.kong.tls.get\_full\_client\_certificate\_chain()*
164164

165-
**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua*, log_by_lua**
165+
**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua*, log_by_lua**, *preread_by_lua**
166166

167-
**subsystems:** *http*
167+
**subsystems:** *http* *stream*
168168

169169
Returns the PEM encoded downstream client certificate chain with the client certificate
170170
at the top and intermediate certificates (if any) at the bottom.
@@ -192,9 +192,9 @@ resty.kong.tls.set\_upstream\_cert\_and\_key
192192
--------------------------------------------
193193
**syntax:** *ok, err = resty.kong.tls.set\_upstream\_cert\_and\_key(chain, key)*
194194

195-
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**
195+
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**, *preread_by_lua**
196196

197-
**subsystems:** *http*
197+
**subsystems:** *http* *stream*
198198

199199
Overrides and enables sending client certificate while connecting to the
200200
upstream in the current request.
@@ -218,9 +218,9 @@ resty.kong.tls.set\_upstream\_ssl\_trusted\_store
218218
-------------------------------------------------
219219
**syntax:** *ok, err = resty.kong.tls.set\_upstream\_ssl\_trusted\_store(store)*
220220

221-
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**
221+
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**, *preread_by_lua**
222222

223-
**subsystems:** *http*
223+
**subsystems:** *http* *stream*
224224

225225
Set upstream ssl verification trusted store of current request. Global setting set by
226226
`proxy_ssl_trusted_certificate` will be overwritten for the current request.
@@ -280,9 +280,9 @@ resty.kong.tls.set\_upstream\_ssl\_verify
280280
-----------------------------------------
281281
**syntax:** *ok, err = resty.kong.tls.set\_upstream\_ssl\_verify(verify)*
282282

283-
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**
283+
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**, *preread_by_lua**
284284

285-
**subsystems:** *http*
285+
**subsystems:** *http* *stream*
286286

287287
Set upstream ssl verification enablement of current request to the given boolean
288288
argument `verify`. Global setting set by `proxy_ssl_verify` will be overwritten.
@@ -299,9 +299,9 @@ resty.kong.tls.set\_upstream\_ssl\_verify\_depth
299299
------------------------------------------------
300300
**syntax:** *ok, err = resty.kong.tls.set\_upstream\_ssl\_verify\_depth(depth)*
301301

302-
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**
302+
**context:** *rewrite_by_lua*, access_by_lua*, balancer_by_lua**, *preread_by_lua**
303303

304-
**subsystems:** *http*
304+
**subsystems:** *http* *stream*
305305

306306
Set upstream ssl verification depth of current request to the given non-negative integer
307307
argument `depth`. Global setting set by `proxy_ssl_verify_depth` will be overwritten.

config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ngx_module_srcs=" \
88
$ngx_addon_dir/src/ngx_http_lua_kong_tag.c \
99
$ngx_addon_dir/src/ngx_http_lua_kong_module.c \
1010
$ngx_addon_dir/src/ngx_http_lua_kong_log.c \
11+
$ngx_addon_dir/src/ssl/ngx_lua_kong_ssl.c \
1112
"
1213

1314
ngx_module_incs="$ngx_addon_dir/src"

0 commit comments

Comments
 (0)