-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCSP nextupdate #296
OCSP nextupdate #296
Conversation
Here's the local test run:
|
3d1720a
to
7b9ff06
Compare
Can I get some feedback on this? |
lib/ngx/ocsp.lua
Outdated
end | ||
|
||
-- rc == FFI_ERROR | ||
|
||
return nil, ffi_str(errbuf, sizep[0]) | ||
return nil, nil, ffi_str(errbuf, sizep[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't change the order of exsting return value because this will break backward-compatibility and
break existing user code. Let use use the 3rd return value for this new data.
Also, will you please add some docs for this new feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to stick to the common convention of returning the error message as the last value. But if we want to avoid the backward incompatibility at the cost of breaking that convention, I can do it.
Also, will you please add some docs for this new feature?
Definitely, I'll add some docs once we settle on the implementation.
@ElvinEfendi Sorry for the delay on our side. Please check out my review comments. Thanks! |
lib/ngx/ocsp.lua
Outdated
@@ -21,6 +22,8 @@ local FFI_BUSY = base.FFI_BUSY | |||
|
|||
|
|||
ffi.cdef[[ | |||
typedef long time_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may interfere with other FFI-based Lua modules. Let's not try to define common types like time_t
ourselves. Just use built-in type names like long
directly.
Hi, Any news on this PR ? I would like to contribute but I'm afraid it's out of my league. Having access to the nextUpdate field will be useful to cache the OCSP responses. I don't see how we can activate OCSP in Openresty without caching any of the OCSP responses at all, it will be terrible on a server with some heavy trafic. Right now I'm thinking about managing the OCSP requests/responses without Openresty, by offloading the responsability to another service and storing the OCSP responses inside a Redis DB that Openresty will use too. It may be more scalable on a server with a lot of certificates and/or differents domains on it (like a load balancer for instance). |
7b9ff06
to
8a5ac6e
Compare
Great job, thank you guys 👍 |
I hereby granted the copyright of the changes in this pull request
to the authors of this lua-resty-core project.
Fixes #75
Depends on openresty/lua-nginx-module#1694
This is a sister PR of openresty/lua-nginx-module#1694.
I can not find the necessary keys to create another OCSP response with
nextUpdate
set. I can do the whole thing from ground up and include all the necessary keys and certs - but if there's already a way to sign another OCSP response for the existing certs int/
it would be better to use that so that I can add more meaningful test cases. UPDATE: I included all the necessary test fixtures and also steps to (re)generate them.