Skip to content

SSL verify issue #2

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

Open
pigri opened this issue Apr 2, 2025 · 5 comments
Open

SSL verify issue #2

pigri opened this issue Apr 2, 2025 · 5 comments

Comments

@pigri
Copy link

pigri commented Apr 2, 2025

Hi!

Do you have experience with Supabase and SSL verification issues?

starttls: error:0A000086:SSL routines::certificate verify failed: unable to get local issuer certificate

I think that's connecting, but I'm not sure. daurnimator/lua-http#217

SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
@AndreMiras
Copy link
Owner

It doesn't ring the bell, but I haven't used it for a while.
To me that looks like a system level issue, like outdated system root certificates or something.
Keep me posted as you get more info.

@pigri
Copy link
Author

pigri commented Apr 2, 2025

It's not outdated; everything is fresh.

I created a test environment. You can quickly reproduce the issue. I want to use exceptional cases with Openresty instead of pure Lua.

https://github.com/pigri/postgrest-openresty-test

cp .env.example .env
docker compose build
docker compose up
curl localhost:8000

@pigri
Copy link
Author

pigri commented Apr 2, 2025

I switched from lua-http to lua-resty-http, and it is functioning correctly.

    local res, err = httpc:request_uri(http_util.encodeURI(url), {
        method = method,
        body = payload and json_implementation.encode(payload),
        headers = headers
    })

@AndreMiras
Copy link
Owner

Thanks for digging into it and thanks for creating a minimal standalone reproduction project.
I'll try to look this up when I get a chance.
I'm not too sure how a HTTP library would behave this way over the other.
Maybe we could make it possible to pass the HTTP client of our choice with some dependency injection, just like it's done for the JSON decoder

@pigri
Copy link
Author

pigri commented Apr 4, 2025

Yeah, that's not a bad idea. I will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants