Skip to content

Commit 3124258

Browse files
committed
Remove PGTESTNOSSL again, and guard the specific unavoidably-failing Node 16 SSL test
1 parent aea2cb9 commit 3124258

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ jobs:
6464
PGPASSWORD: postgres
6565
PGHOST: localhost
6666
PGDATABASE: ci_db_test
67-
# PGTESTNOSSL is generally unset: the postgres-ssl service image above has SSL
67+
# PGTESTNOSSL is no longer set: the postgres-ssl service image above has SSL
6868
# configured, so the SSL and SCRAM channel binding tests can run for real here.
69-
# But Node 16 native build cannot retrieve the server certificate through libpq,
70-
# so the SSL tests stay off there.
71-
PGTESTNOSSL: ${{ matrix.node == 16 && 'true' || '' }}
7269
SCRAM_TEST_PGUSER: scram_test
7370
SCRAM_TEST_PGPASSWORD: test4scram
7471
SCRAM_TEST_PGUSER_UNICODE: scram_unicode_test

packages/pg/test/integration/gh-issues/2085-tests.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ if (process.env.PGTESTNOSSL) {
1111
}
1212

1313
// The native client leaves SSL to libpq, which uses the system OpenSSL. Node 16 and
14-
// earlier statically link OpenSSL 1.1.1 and export its symbols into the process, where
15-
// they collide with the OpenSSL 3 the system libpq is built against: the handshake
16-
// completes, but no peer certificate can be retrieved, so libpq reports "certificate
17-
// could not be obtained: no SSL error reported". Node 18 is the first release to bundle
18-
// OpenSSL 3, and nothing on this side of the boundary can make an earlier one work.
14+
// earlier statically link OpenSSL 1.1.1 and export its symbols, which take precedence
15+
// over the OpenSSL 3 that a current libpq is built against: libpq's calls to SSL_new and
16+
// SSL_connect land in 1.1.1, while its call to SSL_get1_peer_certificate, a name 1.1.1
17+
// does not define, lands in OpenSSL 3 and reads a structure it does not recognize. So the
18+
// handshake completes but no peer certificate can be retrieved, and libpq reports
19+
// "certificate could not be obtained: no SSL error reported". Node 18 is the first release
20+
// to bundle OpenSSL 3, and nothing on this side of the boundary can make an earlier one work.
1921
if (helper.args.native && parseInt(process.versions.openssl, 10) < 3) {
2022
return
2123
}

0 commit comments

Comments
 (0)