| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
| Subject: | Re: Add ssl_(supported|shared)_groups to sslinfo |
| Date: | 2026-09-06 09:04:01 |
| Message-ID: | CAN4CZFNm6xwvnYfqCQLASUp6FtB+5mOJKnoLFjs1-NbLx1oyxQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
+ /*
+ * SSL_group_to_name can return NULL in case of an error, e.g. when no
+ * such name was registered for some reason.
+ */
+ group_name = SSL_group_to_name(ssl, nid);
+ if (group_name == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("unknown OpenSSL group at position %d",
+ call_cntr)));
I'm not sure if erroring out is the proper approach here. Won't this
mean that with a newer openssl version on the client side, the
function will potentially simply error out instead of returning proper
results?
For example, we could report
values[1] = StringGetTextDatum(psprintf("unknown (0x%04x)", nid & 0xffff));
in this case?
@@ -2901,6 +2904,8 @@ decl_checks = [
['strlcpy', 'string.h'],
['strsep', 'string.h'],
['timingsafe_bcmp', 'string.h'],
+ ['SSL_get1_groups', 'openssl/ssl.h'],
+ ['SSL_get_negotiated_group', 'openssl/ssl.h'],
This list isn't OpenSSL-aware, these won't get proper dependencies,
these should go inside the ssl.found() block
+#else
+ /* SSL groups API is not present, skip */
+ MemoryContextSwitchTo(oldcontext);
+ SRF_RETURN_DONE(funcctx);
+#endif
Shouldn't this branch have some documentation / diagnostics so it's
not a completely silent/undocumented skip?
And in the commit message:
select * from ssl_group_info();
type | name
------------+--------------------
That seems to be at typo/earlier leftover as it should be group_type now?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2026-09-06 09:11:18 | Re: Implement waiting for wal lsn replay: reloaded |
| Previous Message | Alexander Lakhin | 2026-09-06 08:00:00 | Re: Stabilize recovery conflict stats checks in 031_recovery_conflict.pl |