Re: pgsql: Add key management system

2020-12-25 Thread Bruce Momjian
On Fri, Dec 25, 2020 at 03:12:08PM -0800, Andres Freund wrote: > Hi, > > On 2020-12-25 15:12:44 -0500, Bruce Momjian wrote: > > There are no tests yet. I need to write those in TAP, and I am going to > > wait until I have something more substantial to test. I do have a test > > framework here I

Re: pgsql: Add key management system

2020-12-25 Thread Andres Freund
Hi, On 2020-12-25 15:12:44 -0500, Bruce Momjian wrote: > There are no tests yet. I need to write those in TAP, and I am going to > wait until I have something more substantial to test. I do have a test > framework here I am using. That's not great. It's not a tiny amount of code, and not having

Re: pgsql: Add key management system

2020-12-25 Thread Bruce Momjian
On Fri, Dec 25, 2020 at 02:53:10PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Dec 25, 2020 at 02:37:06PM -0500, Tom Lane wrote: > >> pg_attribute_noreturn() seems like a good idea, but we're also going to > >> need dummy return statements in the callers, to satisfy compilers that >

Re: pgsql: Add key management system

2020-12-25 Thread Tom Lane
Bruce Momjian writes: > On Fri, Dec 25, 2020 at 02:37:06PM -0500, Tom Lane wrote: >> pg_attribute_noreturn() seems like a good idea, but we're also going to >> need dummy return statements in the callers, to satisfy compilers that >> don't understand that. > Yes, done. I tested it with a non-Open

Re: pgsql: Add key management system

2020-12-25 Thread Bruce Momjian
On Fri, Dec 25, 2020 at 02:37:06PM -0500, Tom Lane wrote: > I wrote: > > Justin Pryzby writes: > >> I think cipher_failure() should be marked pg_attribute_noreturn(). > > > Perhaps more to the point, it still doesn't build at all without > > --with-openssl. > > [ looks closer ... ] Oh, we're on

Re: pgsql: Add key management system

2020-12-25 Thread Tom Lane
I wrote: > Justin Pryzby writes: >> I think cipher_failure() should be marked pg_attribute_noreturn(). > Perhaps more to the point, it still doesn't build at all without > --with-openssl. [ looks closer ... ] Oh, we're on about the same thing -- the difference is that sifaka is using -Werror. p

Re: pgsql: Add key management system

2020-12-25 Thread Tom Lane
Justin Pryzby writes: > I think cipher_failure() should be marked pg_attribute_noreturn(). Perhaps more to the point, it still doesn't build at all without --with-openssl. https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sifaka&dt=2020-12-25%2019%3A13%3A19 regards

Re: pgsql: Add key management system

2020-12-25 Thread Justin Pryzby
I think cipher_failure() should be marked pg_attribute_noreturn(). gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fex

pgsql: Add key management system

2020-12-25 Thread Bruce Momjian
Add key management system This adds a key management system that stores (currently) two data encryption keys of length 128, 192, or 256 bits. The data keys are AES256 encrypted using a key encryption key, and validated via GCM cipher mode. A command to obtain the key encryption key must be speci