]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: don't recalculate etags for slo/dlo
authorCasey Bodley <cbodley@redhat.com>
Tue, 9 Apr 2019 19:26:08 +0000 (15:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 9 Apr 2019 19:26:10 +0000 (15:26 -0400)
for slo, we've already calculated this as 'lo_etag' in get_params()
for dlo, the local 'etag' already contains the hash of an empty string

the calls to complete_etag() were calling hash.Final() a second time on
the same hash without a hash.Restart() in between. this apparently
worked fine with NSS, but with OpenSSL the second call to Final()
returns a different value

Fixes: https://tracker.ceph.com/issues/39160
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_op.cc

index f615d89bade2dfb7eec3c5c11f9b774bfbf625ad..3a06188ec36598048adbc4b6037f1a8965b10e42 100644 (file)
@@ -3848,18 +3848,12 @@ void RGWPutObj::execute()
       ldpp_dout(this, 0) << "bad user manifest: " << dlo_manifest << dendl;
       return;
     }
-    complete_etag(hash, &etag);
-    ldpp_dout(this, 10) << __func__ << ": calculated md5 for user manifest: " << etag << dendl;
   }
 
   if (slo_info) {
     bufferlist manifest_bl;
     encode(*slo_info, manifest_bl);
     emplace_attr(RGW_ATTR_SLO_MANIFEST, std::move(manifest_bl));
-
-    hash.Update((unsigned char *)(slo_info->raw_data.c_str()), slo_info->raw_data.length());
-    complete_etag(hash, &etag);
-    ldpp_dout(this, 10) << __func__ << ": calculated md5 for user manifest: " << etag << dendl;
   }
 
   if (supplied_etag && etag.compare(supplied_etag) != 0) {