]> git-server-git.apps.pok.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, 26 Jan 2026 15:27:10 +0000 (10:27 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/auth/cephx/CephxProtocol.h

index 8dbc42ba4a6aead3be21df2e27d249b6ca3d2aef..804f007615083cc965f304e9d3463a8ec9bfbf79 100644 (file)
@@ -608,8 +608,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;