]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: introduce AWS_AUTHv4_IO.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 6 Oct 2016 12:59:28 +0000 (14:59 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:22 +0000 (22:57 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_client_io.h
src/rgw/rgw_rest.cc

index 62d7ddab10b1ec014ff4787259a4c575c1c18951..69dc01d976bc3a8b09839ee89b2926b10b34974a 100644 (file)
@@ -275,7 +275,7 @@ void rgw_create_s3_v4_canonical_request(struct req_state *s, const string& canon
     request_payload_hash = "UNSIGNED-PAYLOAD";
   } else {
     if (s->aws4_auth_needs_complete) {
-      request_payload_hash = RESTFUL_IO(s)->grab_aws4_sha256_hash();
+      request_payload_hash = AWS_AUTHv4_IO(s)->grab_aws4_sha256_hash();
     } else {
       if (s->aws4_auth_streaming_mode) {
         request_payload_hash = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD";
index 46e2da118b61ae949aa5136d923e0347b0d38623..e7cca88268df03836bd2549ca0c593eb224f74a9 100644 (file)
@@ -212,14 +212,18 @@ public:
 
 /* Type conversions to work around lack of req_state type hierarchy matching
  * (e.g.) REST backends (may be replaced w/dynamic typed req_state). */
-static inline RGWRestfulIO* RESTFUL_IO(struct req_state* s) {
-  return static_cast<RGWRestfulIO*>(s->cio);
+static inline rgw::io::RestfulClient* RESTFUL_IO(struct req_state* s) {
+  return static_cast<rgw::io::RestfulClient*>(s->cio);
 }
 
 static inline rgw::io::Accounter* ACCOUNTING_IO(struct req_state* s) {
   return dynamic_cast<rgw::io::Accounter*>(s->cio);
 }
 
+static inline RGWRestfulIO* AWS_AUTHv4_IO(struct req_state* s) {
+  return static_cast<RGWRestfulIO*>(s->cio);
+}
+
 
 class RGWClientIOStreamBuf : public std::streambuf {
 protected:
index 9e49eb072ace7235b3e784969388421d6a32d9ce..dfddc3a29f1b43fb9a8fa27d89b32845386fb50e 100644 (file)
@@ -854,7 +854,7 @@ int recv_body(struct req_state* const s,
               const size_t max)
 {
   try {
-    return RESTFUL_IO(s)->recv_body(buf, max, s->aws4_auth_needs_complete);
+    return AWS_AUTHv4_IO(s)->recv_body(buf, max, s->aws4_auth_needs_complete);
   } catch (rgw::io::RestfulClient::Exception& e) {
     return -e.code().value();
   }