pgcrypto: Tweak error message for incorrect session key length

The error message added in 379695d3cc 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
This commit is contained in:
Michael Paquier 2026-02-16 12:18:30 +09:00
parent 5d5232bc38
commit 74b993a000
2 changed files with 2 additions and 2 deletions

View file

@ -44,4 +44,4 @@ ff62c0a33d9143dd3f639893f47732c11c5a12c6052d1935f4d507b7ae1f76ab0e9a69b8
7305a7f7c19bd509daf4903bff614bc26d118f03e461469c72c12d3a2bb4f78e4d342ce8
487723649a01ed2b9eb11c662134502c098d55dfcd361939d8370873422c3da75a515a75
9ffedfe7df44fb3c20f81650801a30d43b5c90b98b3eee'::bytea);
ERROR: Public key too big
ERROR: Session key too big

View 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,