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>
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) {