leafo / pgmoon

A pure Lua Postgres driver for use in OpenResty & more
MIT License
390 stars 93 forks source link

Add support for X509 signature algorithms such as RSA-SHA1 and ECDSA-with-SHA384 #130

Closed gsimko closed 1 year ago

gsimko commented 1 year ago

When using ECDSA certificate, the signature name is the full name (e.g., ecdsa-with-SHA384), but indeed should be the digest part only (e.g., SHA384). Similarly, RSA-SHA1 is broken now because it doesn't start with SHA1 hence it doesn't get replace with SHA256.

This PR fixes both of these problems. It's an alternative proposal to https://github.com/leafo/pgmoon/pull/127 that works for all socket types but I didn't touch cqueues because I was not sure why it was hardcoded as SHA256.

gsimko commented 1 year ago

It doesn't look like the unit tests are executed by github. FWIW I have observed on my laptop that "make test" works fine but I couldn't get "make test_resty" to work (resty couldn't find the lua libraries installed by luarocks and lua 5.14 was not working with moonscript, etc, I gave up after an hour)

leafo commented 1 year ago

Thanks, I'm fine with this for now until we get a more robust solution

wombat commented 1 year ago

@leafo Do you have any timeline when a new release will be made, so kong can update its dependencies and crunchy postgres operator will be usable with it again?

leafo commented 1 year ago

@wombat Sorry about the delay. Don't hesitate to bug me about pushing out a new version. Sometimes I sit on some changes for a bit in case other things come up. I've just released 1.16 to opm and luarocks