Avoid generating SSL certs for LDAP tests

Started by Andrew Dunstanover 3 years ago4 messageshackers
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

We don't generate SSL certificates for running the SSL tests, but
instead use pregenerated certificates that are part of our source code.
This patch applies the same policy to the LDAP tests, and in fact simply
reuses certificates from the SSL test suite by copying them. It won't
save much but it should save a handful of cycles at run time.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachments:

0001-Use-existing-SSL-certs-in-LDAP-tests-instead-of-gene.patchtext/x-patch; charset=UTF-8; name=0001-Use-existing-SSL-certs-in-LDAP-tests-instead-of-gene.patchDownload+8-14
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: Avoid generating SSL certs for LDAP tests

Andrew Dunstan <andrew@dunslane.net> writes:

We don't generate SSL certificates for running the SSL tests, but
instead use pregenerated certificates that are part of our source code.
This patch applies the same policy to the LDAP tests, and in fact simply
reuses certificates from the SSL test suite by copying them. It won't
save much but it should save a handful of cycles at run time.

+1, but should there be a comment somewhere under test/ssl pointing
out this external use of the certs?

Also, I bet this needs some adjustment for VPATH builds.

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: Avoid generating SSL certs for LDAP tests

On 2022-12-19 Mo 10:25, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

We don't generate SSL certificates for running the SSL tests, but
instead use pregenerated certificates that are part of our source code.
This patch applies the same policy to the LDAP tests, and in fact simply
reuses certificates from the SSL test suite by copying them. It won't
save much but it should save a handful of cycles at run time.

+1, but should there be a comment somewhere under test/ssl pointing
out this external use of the certs?

OK, I'll find a place to mention that.

Also, I bet this needs some adjustment for VPATH builds.

I have tested it with both a make style vpath build and with meson - it
works fine.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

#4Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#3)
Re: Avoid generating SSL certs for LDAP tests

On 2022-12-19 Mo 11:04, Andrew Dunstan wrote:

On 2022-12-19 Mo 10:25, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

We don't generate SSL certificates for running the SSL tests, but
instead use pregenerated certificates that are part of our source code.
This patch applies the same policy to the LDAP tests, and in fact simply
reuses certificates from the SSL test suite by copying them. It won't
save much but it should save a handful of cycles at run time.

+1, but should there be a comment somewhere under test/ssl pointing
out this external use of the certs?

OK, I'll find a place to mention that.

Done.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com