-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PostgreSQL 15 SSL authentication and test with SSL
- Loading branch information
Showing
6 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM public.ecr.aws/docker/library/postgres:15.10-bookworm | ||
COPY ./test/config/ssl_test.crt /var/lib/postgresql/server.crt | ||
COPY ./test/config/ssl_test.key /var/lib/postgresql/server.key | ||
RUN chown postgres /var/lib/postgresql/server.key /var/lib/postgresql/server.key && chmod 600 /var/lib/postgresql/server.key | ||
|
||
CMD ["postgres", "-c", "ssl=on", "-c", "ssl_cert_file=/var/lib/postgresql/server.crt", "-c", "ssl_key_file=/var/lib/postgresql/server.key"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/lib/resty/openssl/auxiliary/nginx.lua b/lib/resty/openssl/auxiliary/nginx.lua | ||
index 5755d8a..540cbc1 100644 | ||
--- a/lib/resty/openssl/auxiliary/nginx.lua | ||
+++ b/lib/resty/openssl/auxiliary/nginx.lua | ||
@@ -44,8 +44,9 @@ else | ||
local ngx_has_http_v3 = ngx_configure and ngx_configure:find("--with-http_v3_module", 1, true) | ||
-- https://github.com/nginx/nginx/blob/master/src/core/ngx_connection.h | ||
if ngx_version == 1017008 or ngx_version == 1019003 or ngx_version == 1019009 | ||
- or ngx_version == 1021004 or (not ngx_has_http_v3 and ngx_version == 1025003) then | ||
- -- 1.17.8, 1.19.3, 1.19.9, 1.21.4, 1.25.3 | ||
+ or ngx_version == 1021004 | ||
+ or (not ngx_has_http_v3 and (ngx_version == 1025003 or ngx_version == 1027001)) then | ||
+ -- 1.17.8, 1.19.3, 1.19.9, 1.21.4, 1.25.3, 1.27.1 | ||
ffi.cdef [[ | ||
typedef struct ngx_proxy_protocol_s ngx_proxy_protocol_t; | ||
|
||
@@ -82,7 +83,7 @@ else | ||
// trimmed | ||
} ngx_connection_s; | ||
]] | ||
- elseif ngx_has_http_v3 and ngx_version == 1025003 then | ||
+ elseif ngx_has_http_v3 and (ngx_version == 1025003 or ngx_version == 1027001) then | ||
-- 1.25.3 | ||
ffi.cdef [[ | ||
typedef struct ngx_proxy_protocol_s ngx_proxy_protocol_t; | ||
@@ -255,7 +256,7 @@ else | ||
ngx.config.ngx_lua_version and | ||
ngx.config.ngx_lua_version | ||
|
||
- if ngx_lua_version >= 10019 and ngx_lua_version <= 10026 then | ||
+ if ngx_lua_version >= 10019 and ngx_lua_version <= 10027 then | ||
-- https://github.com/openresty/lua-nginx-module/blob/master/src/ngx_http_lua_socket_tcp.h | ||
ffi.cdef[[ | ||
typedef struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters