const auto signing_key = \
rgw::auth::s3::get_v4_signing_key(s->cct, credential_scope, *secret_key);
- return rgw::auth::Completer::cmplptr_t(
- new AWSv4ComplMulti(s,
- std::move(date),
- std::move(credential_scope),
- std::move(seed_signature),
- signing_key));
+ return std::make_shared<AWSv4ComplMulti>(s,
+ std::move(date),
+ std::move(credential_scope),
+ std::move(seed_signature),
+ signing_key);
}
size_t AWSv4ComplSingle::recv_body(char* const buf, const size_t max)
AWSv4ComplSingle::create(const req_state* const s,
const boost::optional<std::string>&)
{
- return rgw::auth::Completer::cmplptr_t(new AWSv4ComplSingle(s));
+ return std::make_shared<AWSv4ComplSingle>(s);
}
} /* namespace s3 */
SHA256* sha256_hash;
std::string prev_chunk_signature;
+ bool is_signature_mismatched();
+ std::string calc_chunk_signature(const std::string& payload_hash) const;
+
+public:
+ /* We need the constructor to be public because of the std::make_shared that
+ * is employed by the create() method. */
AWSv4ComplMulti(const req_state* const s,
std::string date,
std::string credential_scope,
prev_chunk_signature(std::move(seed_signature)) {
}
- bool is_signature_mismatched();
- std::string calc_chunk_signature(const std::string& payload_hash) const;
-
-public:
~AWSv4ComplMulti() {
if (sha256_hash) {
calc_hash_sha256_close_stream(&sha256_hash);
const char* const expected_request_payload_hash;
ceph::crypto::SHA256* sha256_hash = nullptr;
- /* Defined in rgw_auth_s3.cc because of get_v4_exp_payload_hash(). */
+public:
+ /* Defined in rgw_auth_s3.cc because of get_v4_exp_payload_hash(). We need
+ * the constructor to be public because of the std::make_shared employed by
+ * the create() method. */
AWSv4ComplSingle(const req_state* const s);
-public:
~AWSv4ComplSingle() {
if (sha256_hash) {
calc_hash_sha256_close_stream(&sha256_hash);