EnterpriseDB / sslutils

A Postgres extension for managing SSL certificates through SQL.
PostgreSQL License
8 stars 3 forks source link

PostgreSQL 16 and 17 support #3

Closed devrimgunduz closed 1 month ago

devrimgunduz commented 1 year ago

Hi,

1.3 does not build against v16 (see below). which is due tomorrow. Can you please take a look?

Thanks!

Regards, Devrim

/usr/bin/mkdir -p '/home/devrim/rpm16/BUILDROOT/sslutils_16-1.3-5.f42.1.x86_64/usr/pgsql-16/share/extension' sslutils.c: In function 'openssl_rsa_key_to_csr': sslutils.c:571:31: warning: implicit declaration of function 'VARDATA_ANY' [-Wimplicit-function-declaration] 571 bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^~~ sslutils.c:571:49: warning: implicit declaration of function 'VARSIZE_ANY_EXHDR' [-Wimplicit-function-declaration] 571 bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^~~~~ sslutils.c:571:31: warning: passing argument 1 of 'BIO_new_mem_buf' makes pointer from integer without a cast [-Wint-conversion] 571 bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^~~~
int
In file included from /usr/include/openssl/err.h:29, from sslutils.c:22: /usr/include/openssl/bio.h:671:34: note: expected 'const void *' but argument is of type 'int' 671 BIO BIO_new_mem_buf(const void buf, int len); ~~^ sslutils.c:615:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 615 (unsigned char *) VARDATA_ANY(country), ^ sslutils.c:622:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 622 (unsigned char *) VARDATA_ANY(state), ^ sslutils.c:629:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 629 (unsigned char *) VARDATA_ANY(city), ^ sslutils.c:636:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 636 (unsigned char *) VARDATA_ANY(organization), ^ sslutils.c:643:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 643 (unsigned char *) VARDATA_ANY(organization_unit), ^ sslutils.c:651:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 651 (unsigned char *) VARDATA_ANY(cn), ^ sslutils.c:658:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 658 (unsigned char *) VARDATA_ANY(email), ^ sslutils.c: In function 'openssl_csr_to_crt': sslutils.c:786:31: warning: passing argument 1 of 'BIO_new_mem_buf' makes pointer from integer without a cast [-Wint-conversion] 786 bio = BIO_new_mem_buf(VARDATA_ANY(csr), VARSIZE_ANY_EXHDR(csr)); ^~~~
int

/usr/include/openssl/bio.h:671:34: note: expected 'const void ' but argument is of type 'int' 671 | BIO BIO_new_mem_buf(const void buf, int len); | ~~^ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -shared -o sslutils.so sslutils.o -L/usr/pgsql-16/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-16/lib',--enable-new-dtags -fvisibility=hidden -lcrypto -lssl sslutils.c:571:24: error: call to undeclared function 'VARDATA_ANY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^ sslutils.c:571:42: error: call to undeclared function 'VARSIZE_ANY_EXHDR'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^ sslutils.c:571:24: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void ' [-Wint-conversion] bio = BIO_new_mem_buf(VARDATA_ANY(key), VARSIZE_ANY_EXHDR(key)); ^~~~ /usr/include/openssl/bio.h:671:34: note: passing argument to parameter 'buf' here BIO BIO_new_mem_buf(const void buf, int len); ^ sslutils.c:615:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(country), ^~~~~~~~~~ sslutils.c:622:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(state), ^~~~~~~~ sslutils.c:629:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(city), ^~~~~~~~~~~ sslutils.c:636:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(organization), ^~~~~~~~~~~ sslutils.c:643:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(organization_unit), ^~~~~~~~~~~~ sslutils.c:651:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(cn), ^~~~~~~~~ sslutils.c:658:34: warning: cast to 'unsigned char ' from smaller integer type 'int' [-Wint-to-pointer-cast] (unsigned char ) VARDATA_ANY(email), ^~~~~~~~ sslutils.c:786:24: error: call to undeclared function 'VARDATA_ANY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] bio = BIO_new_mem_buf(VARDATA_ANY(csr), VARSIZE_ANY_EXHDR(csr)); ^ sslutils.c:786:42: error: call to undeclared function 'VARSIZE_ANY_EXHDR'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] bio = BIO_new_mem_buf(VARDATA_ANY(csr), VARSIZE_ANY_EXHDR(csr)); ^ sslutils.c:786:24: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void ' [-Wint-conversion] bio = BIO_new_mem_buf(VARDATA_ANY(csr), VARSIZE_ANY_EXHDR(csr)); ^~~~ /usr/include/openssl/bio.h:671:34: note: passing argument to parameter 'buf' here BIO BIO_new_mem_buf(const void *buf, int len); ^ 7 warnings and 6 errors generated.

devrimgunduz commented 1 year ago

ping

devrimgunduz commented 2 months ago

This is also valid for PostgreSQL 17.

devrimgunduz commented 1 month ago

ping

edbjunwang commented 1 month ago

Hi @devrimgunduz , we are using foundation packaging workflow to build EPAS/PG/PGE sslutils: https://github.com/EnterpriseDB/sslutils-packaging/actions/workflows/foundation-packaging.yml, it is working for PG16

dpage commented 1 month ago

@edbjunwang SSLUtils is open source. Foundation is irrelevant.

devrimgunduz commented 1 month ago

That link is EDB specific I think, as it gives me 404. I don't know how you build it but the latest tarball does not build. That is all I can say.

dpage commented 1 month ago

What tarball?

devrimgunduz commented 1 month ago

https://github.com/EnterpriseDB/sslutils/releases

dpage commented 1 month ago

Ah, so it probably just needs a new release tag.

devrimgunduz commented 1 month ago

Yes

edbjunwang commented 1 month ago

I just created a new release: https://github.com/EnterpriseDB/sslutils/releases/tag/v1.3-1 @devrimgunduz Could you check if it can work for you?

dpage commented 1 month ago

Wouldn't 1.4 be more appropriate? 1.3-1 implies a re-wrap.

edbjunwang commented 1 month ago

If bump up the major version, I guess the SQL files need be updated too, like this one for v1.3 (https://github.com/EnterpriseDB/sslutils/blob/master/sslutils--1.3.sql) @asheshv May I ask if you have any suggestion on this?

dpage commented 1 month ago

The API version number doesn't need to match the code version. For example, pldebugger is now at v1.8, but the API is still at v1.1.

edbjunwang commented 1 month ago

Ohk. v1.4 release is created: https://github.com/EnterpriseDB/sslutils/releases/tag/v1.4 v1.3-1 is deleted.

dpage commented 1 month ago

Thanks!

devrimgunduz commented 1 month ago

Thanks. FWIW it also builds fine against PostgreSQL 17. Closing this issue.