feature: implemented ssl_session_fetch_by_lua* and ssl_session_store_by_lua* #822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These directives can be used to implement (distributed) caching of SSL sessions (via SSL session IDs) for downstream connections.
The Lua API for manipulating SSL sessions in these two running contexts is provided in the following PR for lua-resty-core:
openresty/lua-resty-core#53
Dependencies:
The patch can also be applied cleanly to a little older versions of NGINX cores like 1.9.15.
If a recent version of OpenResty is used, like 1.9.15.1, then the following patch should be applied to OpenResty's bundled version of the NGINX core instead:
https://github.com/openresty/openresty/blob/master/patches/nginx-1.11.2-ssl_pending_session.patch
https://github.com/openresty/openresty/blob/master/patches/openssl-1.0.2h-sess_set_get_cb_yield.patch
This is for the latest OpenSSL 1.0.2h version. Earlier verisons like 1.0.2e might also work, but the latest version of OpenSSL is strongly encouraged.
Special thanks go to Zi Lin for contributing this new feature and also to CloudFlare for supporting this work.