@@ -13,9 +13,7 @@ Table of Contents
13
13
* [ lua\_ kong\_ load\_ var\_ index] ( #lua_kong_load_var_index )
14
14
* [ lua\_ kong\_ set\_ static\_ tag] ( #lua_kong_set_static_tag )
15
15
* [ Methods] ( #methods )
16
- * [ resty.kong.tls.request\_ client\_ certificate] ( #restykongtlsrequest_client_certificate )
17
16
* [ resty.kong.tls.disable\_ session\_ reuse] ( #restykongtlsdisable_session_reuse )
18
- * [ resty.kong.tls.set\_ client\_ ca\_ list] ( #restykongtlsset_client_ca_list )
19
17
* [ resty.kong.tls.get\_ full\_ client\_ certificate\_ chain] ( #restykongtlsget_full_client_certificate_chain )
20
18
* [ resty.kong.tls.set\_ upstream\_ cert\_ and\_ key] ( #restykongtlsset_upstream_cert_and_key )
21
19
* [ resty.kong.tls.set\_ upstream\_ ssl\_ trusted\_ store] ( #restykongtlsset_upstream_ssl_trusted_store )
@@ -144,29 +142,6 @@ you will always get the value where your Lua code runs in but not others.
144
142
Methods
145
143
=======
146
144
147
- resty.kong.tls.request\_ client\_ certificate
148
- -------------------------------------------
149
- ** syntax:** * succ, err = resty.kong.tls.request\_ client\_ certificate()*
150
-
151
- ** context:** * ssl_certificate_by_lua* ; *
152
-
153
- ** subsystems:** * http*
154
-
155
- Requests client to present its client-side certificate to initiate mutual TLS
156
- authentication between server and client.
157
-
158
- This function only * requests* , but does not * require* the client to start the mTLS
159
- process. Even if the client did not present a client certificate the TLS handshake
160
- will still complete (obviously not being mTLS in that case).
161
- Whether the client honored the request can be determined using
162
- [ get\_ full\_ client\_ certificate\_ chain] ( #restykongtlsget_full_client_certificate_chain )
163
- in later phases.
164
-
165
- This function returns ` true ` when the call is successful. Otherwise it returns
166
- ` nil ` and a string describing the error.
167
-
168
- [ Back to TOC] ( #table-of-contents )
169
-
170
145
resty.kong.tls.disable\_ session\_ reuse
171
146
--------------------------------------
172
147
** syntax:** * succ, err = resty.kong.tls.disable\_ session\_ reuse()*
@@ -183,59 +158,6 @@ This function returns `true` when the call is successful. Otherwise it returns
183
158
184
159
[ Back to TOC] ( #table-of-contents )
185
160
186
- resty.kong.tls.set\_ client\_ ca\_ list
187
- -------------------------------------------
188
- ** syntax:** * succ, err = resty.kong.tls.set\_ client\_ ca\_ list(ca_list)*
189
-
190
- ** context:** * ssl_certificate_by_lua* ; *
191
-
192
- ** subsystems:** * http*
193
-
194
- Set the CA DN list to the underlying SSL structure, which will be sent in the
195
- Certificate Request Message of downstram TLS handshake.
196
-
197
- The downstream client then can use this DN information to filter certificates,
198
- and chooses an appropriate certificate issued by a CA in the list.
199
-
200
- ` ca_list ` is of type ` STACK_OF(X509) * ` which can be created by using the API
201
- of ` resty.openssl.x509.chain ` as follows:
202
-
203
- ``` lua
204
- local tls_lib = require " resty.kong.tls"
205
- local x509_lib = require " resty.openssl.x509"
206
- local chain_lib = require " resty.openssl.x509.chain"
207
-
208
- local suc , err
209
- local chain = chain_lib .new ()
210
- -- err check
211
- local x509 , err = x509_lib .new (pem_cert , " PEM" )
212
- -- err check
213
- suc , err = chain :add (x509 )
214
- -- err check
215
-
216
- -- `chain.ctx` is the raw data of the chain, i.e. `STACK_OF(X509) *`
217
- suc , err = tls_lib .set_client_ca_list (chain .ctx )
218
- -- err check
219
- ```
220
-
221
- Or by using ` ngx.ssl ` as follows:
222
-
223
- ``` lua
224
- local ssl = require " ngx.ssl"
225
-
226
- local chain , err = ssl .parse_pem_cert (pem_cert_chain )
227
- -- note the `chain` returned by `ssl.parse_pem_cert` is already a raw `STACK_OF(X509) *`
228
- -- err check
229
-
230
- suc , err = tls_lib .set_client_ca_list (chain )
231
- -- err check
232
- ```
233
-
234
- This function returns ` true ` when the call is successful. Otherwise it returns
235
- ` nil ` and a string describing the error.
236
-
237
- [ Back to TOC] ( #table-of-contents )
238
-
239
161
resty.kong.tls.get\_ full\_ client\_ certificate\_ chain
240
162
----------------------------------------------------
241
163
** syntax:** * pem_chain, err = resty.kong.tls.get\_ full\_ client\_ certificate\_ chain()*
0 commit comments