]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pgcrypto: Tweak error message for incorrect session key length
authorMichael Paquier <michael@paquier.xyz>
Mon, 16 Feb 2026 03:18:18 +0000 (12:18 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 16 Feb 2026 03:18:18 +0000 (12:18 +0900)
The error message added in 379695d3cc70 referred to the public key being
too long.  This is confusing as it is in fact the session key included
in a PGP message which is too long.  This is harmless, but let's be
precise about what is wrong.

Per offline report.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Backpatch-through: 14

contrib/pgcrypto/expected/pgp-pubkey-session.out
contrib/pgcrypto/px.c

index f724d98eb245932a86cdd3dd57483ffc99636479..e57cb8fab99c3ec17eac652fcd0213f3d9ff4ac2 100644 (file)
@@ -44,4 +44,4 @@ ff62c0a33d9143dd3f639893f47732c11c5a12c6052d1935f4d507b7ae1f76ab0e9a69b8
 7305a7f7c19bd509daf4903bff614bc26d118f03e461469c72c12d3a2bb4f78e4d342ce8
 487723649a01ed2b9eb11c662134502c098d55dfcd361939d8370873422c3da75a515a75
 9ffedfe7df44fb3c20f81650801a30d43b5c90b98b3eee'::bytea);
-ERROR:  Public key too big
+ERROR:  Session key too big
index d9bf1aae81e630eb115f11bc229fa6e5c93a2ac2..f08bc498ac876b954396ec04d78dbb9b03a0b18e 100644 (file)
@@ -65,7 +65,7 @@ static const struct error_desc px_err_list[] = {
        {PXE_PGP_UNEXPECTED_PKT, "Unexpected packet in key data"},
        {PXE_PGP_MATH_FAILED, "Math operation failed"},
        {PXE_PGP_SHORT_ELGAMAL_KEY, "Elgamal keys must be at least 1024 bits long"},
-       {PXE_PGP_KEY_TOO_BIG, "Public key too big"},
+       {PXE_PGP_KEY_TOO_BIG, "Session key too big"},
        {PXE_PGP_UNKNOWN_PUBALGO, "Unknown public-key encryption algorithm"},
        {PXE_PGP_WRONG_KEY, "Wrong key"},
        {PXE_PGP_MULTIPLE_KEYS,