From e7665d65efec33c91908b9c93bfca146969f8bd2 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 29 May 2025 11:53:04 -0400 Subject: [PATCH] auth/cephx: set error message when decryption fails Signed-off-by: Patrick Donnelly (cherry picked from commit 703a8acbf8de5096821ae56965850d8b8ed5a218) --- src/auth/cephx/CephxProtocol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index c739d30ed52..956c08400ee 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -583,8 +583,10 @@ void decode_decrypt_enc_bl(CephContext *cct, T& t, const CryptoKey& key, uint64_t magic; ceph::buffer::list bl; - if (key.decrypt(cct, bl_enc, bl, &error) < 0) + if (key.decrypt(cct, bl_enc, bl, &error) < 0) { + error = "decryption failed"; return; + } auto iter2 = bl.cbegin(); __u8 struct_v; -- 2.39.5