Lua OCSP stapling
This commit is contained in:
parent
42b3a1ebd2
commit
1dab12fb81
6 changed files with 164 additions and 5 deletions
|
|
@ -128,6 +128,34 @@ describe("Certificate", function()
|
|||
refute_certificate_is_set()
|
||||
assert.spy(ngx.log).was_called_with(ngx.ERR, "failed to convert certificate chain from PEM to DER: PEM_read_bio_X509_AUX() failed")
|
||||
end)
|
||||
|
||||
describe("OCSP stapling", function()
|
||||
before_each(function()
|
||||
certificate.is_ocsp_stapling_enabled = true
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
certificate.is_ocsp_stapling_enabled = false
|
||||
end)
|
||||
|
||||
it("fetches and caches OCSP response when there is no cached response", function()
|
||||
end)
|
||||
|
||||
it("fetches and caches OCSP response when cached response is stale", function()
|
||||
end)
|
||||
|
||||
it("staples using cached OCSP response", function()
|
||||
end)
|
||||
|
||||
it("staples using cached stale OCSP response", function()
|
||||
end)
|
||||
|
||||
it("does negative caching when OCSP response URL extraction fails", function()
|
||||
end)
|
||||
|
||||
it("does negative caching when the request to OCSP responder fails", function()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("configured_for_current_request", function()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ search ingress-nginx.svc.cluster.local svc.cluster.local cluster.local
|
|||
options ndots:5
|
||||
]===]
|
||||
|
||||
package.loaded["util.resolv_conf"] = nil
|
||||
|
||||
helpers.with_resolv_conf(conf, function()
|
||||
require("util.resolv_conf")
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
local original_io_open = io.open
|
||||
|
||||
describe("resolv_conf", function()
|
||||
after_each(function()
|
||||
before_each(function()
|
||||
package.loaded["util.resolv_conf"] = nil
|
||||
io.open = original_io_open
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue