From: Michael Paquier Date: Mon, 16 Feb 2026 03:18:18 +0000 (+0900) Subject: pgcrypto: Tweak error message for incorrect session key length X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=459576303dfb47d5b9626331df1f8e8767840ede;p=thirdparty%2Fpostgresql.git pgcrypto: Tweak error message for incorrect session key length 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 Backpatch-through: 14 --- diff --git a/contrib/pgcrypto/expected/pgp-pubkey-session.out b/contrib/pgcrypto/expected/pgp-pubkey-session.out index f724d98eb24..e57cb8fab99 100644 --- a/contrib/pgcrypto/expected/pgp-pubkey-session.out +++ b/contrib/pgcrypto/expected/pgp-pubkey-session.out @@ -44,4 +44,4 @@ ff62c0a33d9143dd3f639893f47732c11c5a12c6052d1935f4d507b7ae1f76ab0e9a69b8 7305a7f7c19bd509daf4903bff614bc26d118f03e461469c72c12d3a2bb4f78e4d342ce8 487723649a01ed2b9eb11c662134502c098d55dfcd361939d8370873422c3da75a515a75 9ffedfe7df44fb3c20f81650801a30d43b5c90b98b3eee'::bytea); -ERROR: Public key too big +ERROR: Session key too big diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c index d9bf1aae81e..f08bc498ac8 100644 --- a/contrib/pgcrypto/px.c +++ b/contrib/pgcrypto/px.c @@ -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,