]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
auth/cephx: set error message when decryption fails
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 29 May 2025 15:53:04 +0000 (11:53 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 22 Sep 2025 16:34:51 +0000 (12:34 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 703a8acbf8de5096821ae56965850d8b8ed5a218)

src/auth/cephx/CephxProtocol.h

index c739d30ed527b223c2132f7ac0e54ef181caf922..956c08400eec0faa36b40b18c80eddbca0f60ec5 100644 (file)
@@ -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;