]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pacific rgw: on FIPS enabled, fix segfault performing s3 multipart PUT 46715/head
authorMark Kogan <mkogan@redhat.com>
Thu, 16 Jun 2022 10:41:17 +0000 (13:41 +0300)
committerMark Kogan <mkogan@redhat.com>
Thu, 16 Jun 2022 10:41:17 +0000 (13:41 +0300)
Fixes: https://tracker.ceph.com/issues/56073
Signed-off-by: Mark Kogan <mkogan@redhat.com>
src/rgw/rgw_op.cc

index 2596c60c415f7129ac649999bcaa75c37dc1c6bd..1b844fa5ec83c20415f2d3bfd0caeccfa2d32f6c 100644 (file)
@@ -6453,6 +6453,8 @@ bool RGWCompleteMultipart::check_previously_completed(const DoutPrefixProvider*
   string oetag = sattrs[RGW_ATTR_ETAG].to_str();
 
   MD5 hash;
+  // Allow use of MD5 digest in FIPS mode for non-cryptographic purposes
+  hash.SetFlags(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
   for (const auto& [index, part] : parts->parts) {
     std::string partetag = rgw_string_unquote(part);
     char petag[CEPH_CRYPTO_MD5_DIGESTSIZE];