diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-01 13:03:12 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-01 13:03:12 +0100 |
commit | 97d7de9af2cb6cc3bbbcae18ada738ace7771903 (patch) | |
tree | a7c6221348272e82406bba446b6b00b1d1b8e608 /server/resty/openssl/auxiliary/bio.lua | |
parent | bf25efd6d3ed28266ed916c0ebe9dd3a45a4affb (diff) |
portal-ng pods run under root user
- switch base image from openresty to nginx-unprivileged
- remove custom lua plugin code
- dynamically determine dns resolver ip during container startup
Issue-ID: PORTALNG-67
Change-Id: I23fb5e684dbb98a326afb00911a1f5ae78e2536d
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'server/resty/openssl/auxiliary/bio.lua')
-rw-r--r-- | server/resty/openssl/auxiliary/bio.lua | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/server/resty/openssl/auxiliary/bio.lua b/server/resty/openssl/auxiliary/bio.lua deleted file mode 100644 index 3eed9f0..0000000 --- a/server/resty/openssl/auxiliary/bio.lua +++ /dev/null @@ -1,43 +0,0 @@ -local ffi = require "ffi" -local C = ffi.C -local ffi_gc = ffi.gc -local ffi_new = ffi.new -local ffi_str = ffi.string - -require "resty.openssl.include.bio" -local format_error = require("resty.openssl.err").format_error - -local function read_wrap(f, ...) - if type(f) ~= "cdata" then -- should be explictly a function - return nil, "bio_util.read_wrap: expect a function at #1" - end - - local bio_method = C.BIO_s_mem() - if bio_method == nil then - return nil, "bio_util.read_wrap: BIO_s_mem() failed" - end - local bio = C.BIO_new(bio_method) - ffi_gc(bio, C.BIO_free) - - -- BIO_reset; #define BIO_CTRL_RESET 1 - local code = C.BIO_ctrl(bio, 1, 0, nil) - if code ~= 1 then - return nil, "bio_util.read_wrap: BIO_ctrl() failed: " .. code - end - - local code = f(bio, ...) - if code ~= 1 then - return nil, format_error(f, code) - end - - local buf = ffi_new("char *[1]") - - -- BIO_get_mem_data; #define BIO_CTRL_INFO 3 - local length = C.BIO_ctrl(bio, 3, 0, buf) - - return ffi_str(buf[0], length) -end - -return { - read_wrap = read_wrap, -}
\ No newline at end of file |