Skip to content

Commit

Permalink
Merge pull request #1333 from samugi/THREESCALE-8000
Browse files Browse the repository at this point in the history
THREESCALE-8000 + THREESCALE-8007 + THREESCALE-8252 (clear context policy part 2)
  • Loading branch information
eguzki authored Apr 20, 2022
2 parents cb8e202 + d38e6ac commit 4bd6d46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed jwk alg confusion [PR #1329](https://github.com/3scale/APIcast/pull/1329) [THREESCALE-8249](https://issues.redhat.com/browse/THREESCALE-8249)
- Fixed issue with resolving target server hostnames to IP when using CONNECT method [PR #1323](https://github.com/3scale/APIcast/pull/1323) [THREESCALE-7967](https://issues.redhat.com/browse/THREESCALE-7967)
- Fixed issue with resolving target server hostnames to IPs when forwarding requests through http/s proxy [PR #1323](https://github.com/3scale/APIcast/pull/1323) [THREESCALE-7967](https://issues.redhat.com/browse/THREESCALE-7967)
- Fixed dirty context [PR #1328](https://github.com/3scale/APIcast/pull/1328) [THREESCALE-8000](https://issues.redhat.com/browse/THREESCALE-8000) [THREESCALE-8007](https://issues.redhat.com/browse/THREESCALE-8007) [THREESCALE-8252](https://issues.redhat.com/browse/THREESCALE-8252)
- Fixed dirty context (part 2 of PR #1328) when tls termination policy is in the policy chain [PR #1333](https://github.com/3scale/APIcast/pull/1333)

### Added

Expand Down
1 change: 0 additions & 1 deletion gateway/src/apicast/policy/tls/tls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function _M:ssl_certificate()
for _, cert in ipairs(self.certificates) do
if set_certificate(cert) then
-- Certificate is set correctly, use this one and end the loop.
ngx.exit(ngx.OK)
break
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/policy/tls/tls_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local function assert_certificate_set()
assert.spy(ssl.clear_certs).was_called()
assert.spy(ssl.set_cert).was_called()
assert.spy(ssl.set_priv_key).was_called()
assert.spy(ngx.exit).was_not_called()
end

describe('tls policy', function()
Expand All @@ -13,6 +14,7 @@ describe('tls policy', function()
stub.new(ssl, 'clear_certs', function() return true, nil end)
stub.new(ssl, 'set_cert', function() return true, nil end)
stub.new(ssl, 'set_priv_key', function() return true, nil end)
stub.new(ngx, 'exit', function() return true end)
end)

describe('.new', function()
Expand Down

0 comments on commit 4bd6d46

Please sign in to comment.